mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
tests: add String#md5 method
This commit is contained in:
parent
af47ad602b
commit
ad45d0aa76
@ -1,3 +1,5 @@
|
|||||||
|
require 'digest/md5'
|
||||||
|
|
||||||
$message_mutex = Mutex.new
|
$message_mutex = Mutex.new
|
||||||
def show_message message
|
def show_message message
|
||||||
$message_mutex.lock
|
$message_mutex.lock
|
||||||
@ -35,6 +37,12 @@ class Array
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class String
|
||||||
|
def md5
|
||||||
|
Digest::MD5.hexdigest self
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# install md5 handler
|
# install md5 handler
|
||||||
case RUBY_PLATFORM
|
case RUBY_PLATFORM
|
||||||
when /darwin/
|
when /darwin/
|
||||||
|
Loading…
Reference in New Issue
Block a user