mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00

* tool/compile_prelude.rb: compile prelude.rb to C string. (prelude.rb -> prelude.c) * common.mk: fix to build with prelude.c. * inits.c (rb_call_inits): ditto. * thread.c (Init_Thread): move definition of Mutex#synchronize to prelude.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
14 lines
132 B
Ruby
14 lines
132 B
Ruby
|
|
# Mutex
|
|
|
|
class Mutex
|
|
class Mutex
|
|
def synchronize
|
|
self.lock
|
|
yield
|
|
ensure
|
|
self.unlock
|
|
end
|
|
end
|
|
end
|
|
|