Project

General

Profile

Actions

Bug #13325

closed

Block is not passed to Symbol proc if using refinements

Added by nobu (Nobuyoshi Nakada) about 7 years ago. Updated about 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:80219]

Description

The following code raises a LocalJumpError at the last line on 2.4 and trunk.
2.3 and earlier work fine.

module M
  refine String do # or any class
  end
end
class C
  def call(a, x, &b)
    b.call(a, &x)
  end
end
o = C.new
x = ->(z){p z}
o.call(42, x, &:tap) #=> 42
using M
o.call(42, x, &:tap) #=> LocalJumpError
Actions

Also available in: Atom PDF

Like0
Like0Like0