mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* prelude.rb: added. run this script on startup.
* 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
This commit is contained in:
parent
b285d26a16
commit
6bf7d3d8c0
6 changed files with 60 additions and 6 deletions
14
prelude.rb
Normal file
14
prelude.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
# Mutex
|
||||
|
||||
class Mutex
|
||||
class Mutex
|
||||
def synchronize
|
||||
self.lock
|
||||
yield
|
||||
ensure
|
||||
self.unlock
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue