1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/prelude.rb
ko1 85e3b47032 * prelude.rb: fix Mutex#synchronize definition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24 18:10:37 +00:00

12 lines
100 B
Ruby

# Mutex
class Mutex
def synchronize
self.lock
yield
ensure
self.unlock
end
end