From: "boris_stitnicky (Boris Stitnicky)" Date: 2013-08-04T14:28:15+09:00 Subject: [ruby-core:56370] [ruby-trunk - Bug #8693] lambda invoked by yield acts as a proc with respect to return Issue #8693 has been updated by boris_stitnicky (Boris Stitnicky). @Alexey: The OP complaint is a spec. But in the discussion (which I thoroughly read only upon your reminder), different issues appear. That of block "hanging around", accessible by Proc.new: l = -> {} # def x; Proc.new end x &l # With its lambda-ness being (counterintuitively) remembered. Also, that of LocalJumpError: def y &b; yield end y &-> { return 42 } Like you said, it is not clear, to what degree these are Ruby bugs, documentation bugs, bugs in our heads, or bugs at all. But their (interesting and enlightening) discussion here seems to me beyond the scope of the OP. ---------------------------------------- Bug #8693: lambda invoked by yield acts as a proc with respect to return https://bugs.ruby-lang.org/issues/8693#change-40880 Author: rits (First Last) Status: Rejected Priority: Normal Assignee: Category: Target version: ruby -v: ruby 2.0.0p247 (2013-06-27) [x64-mingw32] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN irb(main):004:0> def m1; yield end; def m2; m1 &->{return 0}; 1 end; m2 => 0 -- http://bugs.ruby-lang.org/