summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-19 16:40:37 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-19 16:40:37 +0000
commitdd97bd1dddda726a156c1e4f11002bfc5771ac05 (patch)
treef11e21f38bd1c2c0af326bd5768af1d990b35eb6 /lib
parentaa98314cd1b06f60c8a5ad5fdbfb090e72804359 (diff)
merge revision(s) 20752:
* 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_6@22455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/sync.rb5
1 files changed, 3 insertions, 2 deletions
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