Bug #3601: class << self doesn't preserve the given block
http://redmine.ruby-lang.org/issues/show/3601

Author: Magnus Holm
Status: Open, Priority: Normal
ruby -v: ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.3.0]

$ cat 191_bug.rb
  def hello
    class << self
      yield
    end
  end

  p hello { 123 }

Works in 1.8.7 and 1.9.2. Fails in 1.9.1 (and JRuby + Rubinius).


----------------------------------------
http://redmine.ruby-lang.org