public
Created

Mutex#synchronize block params oddity in 2.0

  • Download Gist
mutex.rb
Ruby
1 2 3 4 5
require 'thread'
 
Mutex.new.synchronize do |*args|
p RUBY_VERSION => args
end
output.1.9.txt
1 2 3 4
$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
$ ruby mutex.rb
{"1.9.3"=>[]}
output.2.0.txt
1 2 3 4
$ ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux]
$ ruby mutex.rb
{"2.0.0"=>[nil]}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.