Project

General

Profile

Actions

Bug #13325

closed

Block is not passed to Symbol proc if using refinements

Added by nobu (Nobuyoshi Nakada) over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
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 #1

Updated by nobu (Nobuyoshi Nakada) over 5 years ago

  • Status changed from Open to Closed

Applied in changeset r58015.


vm_args.c: pass block

  • vm_args.c (refine_sym_proc_call): pass block to the method when
    using refinements. [ruby-core:80219] [Bug #13325]

Updated by naruse (Yui NARUSE) over 5 years ago

  • Backport changed from 2.2: DONTNEED, 2.3: DONTNEED, 2.4: REQUIRED to 2.2: DONTNEED, 2.3: DONTNEED, 2.4: DONE

ruby_2_4 r58022 merged revision(s) 58015.

Actions

Also available in: Atom PDF