diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-15 09:55:56 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-15 09:55:56 +0000 |
commit | ac6009d5792550bfc97eadbf882e6573355226a3 (patch) | |
tree | f405c9e8144bf15f95b9bcfa4ca3ead97e60fb52 | |
parent | 5d8659a195065794642cd7cc0872c724812b67bd (diff) |
* lib/sync.rb (Sync_m#sync_try_lock): wrong variable name fixed.
a patch from [ruby-core:20561]
* lib/sync.rb (Sync_m::Err.Fail): turn off Thread.critical before
exit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | lib/sync.rb | 5 |
2 files changed, 11 insertions, 2 deletions
@@ -1,3 +1,11 @@ +Mon Dec 15 18:53:17 2008 Yukihiro Matsumoto <[email protected]> + + * lib/sync.rb (Sync_m#sync_try_lock): wrong variable name fixed. + a patch from [ruby-core:20561] + + * lib/sync.rb (Sync_m::Err.Fail): turn off Thread.critical before + exit. + Thu Dec 11 21:09:47 2008 Akinori MUSHA <[email protected]> * enumerator.c (enumerator_next, enumerator_rewind), diff --git a/lib/sync.rb b/lib/sync.rb index 79522ed885..9e522c2466 100644 --- a/lib/sync.rb +++ b/lib/sync.rb @@ -54,6 +54,7 @@ module Sync_m # exceptions class Err < StandardError def Err.Fail(*opt) + Thread.critical = false fail self, sprintf(self::Message, *opt) end @@ -129,10 +130,10 @@ module Sync_m # locking methods. def sync_try_lock(mode = EX) - return unlock if sync_mode == UN + return unlock if mode == UN Thread.critical = true - ret = sync_try_lock_sub(sync_mode) + ret = sync_try_lock_sub(mode) Thread.critical = false ret end |