Project

General

Profile

This project is closed and read-only.

Actions

Backport #3601

closed

class << self doesn't preserve the given block

Backport #3601: class << self doesn't preserve the given block

Added by judofyr (Magnus Holm) about 16 years ago. Updated about 7 years ago.

Status:
Closed
[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

Actions

Also available in: PDF Atom