Skip to content

Instantly share code, notes, and snippets.

@splattael
Created March 14, 2013 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save splattael/5164747 to your computer and use it in GitHub Desktop.
Save splattael/5164747 to your computer and use it in GitHub Desktop.
Mutex#synchronize block params oddity in 2.0
require 'thread'
Mutex.new.synchronize do |*args|
p RUBY_VERSION => args
end
$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
$ ruby mutex.rb
{"1.9.3"=>[]}
$ ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux]
$ ruby mutex.rb
{"2.0.0"=>[nil]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment