Project

General

Profile

Backport #3601

class << self doesn't preserve the given block

Added by judofyr (Magnus Holm) about 9 years ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
[ruby-core:31444]

Description

=begin
$ 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).
=end

History

#2

Updated by shyouhei (Shyouhei Urabe) almost 9 years ago

  • Status changed from Open to Assigned
  • Assignee set to yugui (Yuki Sonoda)

=begin

=end

#3

Updated by jeremyevans0 (Jeremy Evans) 2 months ago

  • Status changed from Assigned to Closed
  • Description updated (diff)

Also available in: Atom PDF