diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-24 15:26:28 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-24 15:26:28 +0000 |
commit | 6bf7d3d8c08dbd96ec485bb856cb739139e720bc (patch) | |
tree | 25b681e65b65ea04b8748ba31cb8afb6e2f56d32 /prelude.rb | |
parent | b285d26a16c90f8e2d491592e793c3b40545aaf1 (diff) |
* 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
Diffstat (limited to 'prelude.rb')
-rw-r--r-- | prelude.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/prelude.rb b/prelude.rb new file mode 100644 index 0000000000..423c9c423e --- /dev/null +++ b/prelude.rb @@ -0,0 +1,14 @@ + +# Mutex + +class Mutex + class Mutex + def synchronize + self.lock + yield + ensure + self.unlock + end + end +end + |