1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2001-07-19 05:49:51 +00:00
parent eaddc4a94b
commit f50be7cba7

View file

@ -1,3 +1,42 @@
: Digest module
Added as a replacement for md5 and sha1 modules.
require 'digest/md5'
include Digest
md = MD5.new
md << "abc"
puts md
puts MD5.hexdigest("123")
: Dir::chdir
Changed to warn only when invoked from multiple threads or no block
is given. [ruby-dev:13823]
Dir.chdir("/tmp")
pwd = Dir.pwd #=> "/tmp"
puts pwd
Dir.chdir("foo") {
pwd = Dir.pwd #=> "/tmp/foo"
puts pwd
Dir.chdir("bar") { # <-- previously warned
pwd = Dir.pwd #=> "/tmp/foo/bar"
puts pwd
}
pwd = Dir.pwd #=> "/tmp/foo"
puts pwd
}
pwd = Dir.pwd #=> "/tmp"
puts pwd
: Proc#yield
Added. This is equivalent to Proc#call except it does not check the