Actions
Bug #13325
closedBlock is not passed to Symbol proc if using refinements
Bug #13325: Block is not passed to Symbol proc if using refinements
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
Updated by nobu (Nobuyoshi Nakada) over 8 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 8 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