From: "alexeymuranov (Alexey Muranov)" Date: 2013-08-04T18:43:00+09:00 Subject: [ruby-core:56371] [ruby-trunk - Bug #8693] lambda invoked by yield acts as a proc with respect to return Issue #8693 has been updated by alexeymuranov (Alexey Muranov). @rits: i plan to stop commenting on this thread and hope that Matz or someone else will provide and authoritative explanation some time. I want to mention however how i view blocks in Ruby. For me a block "{ |x| x + 1 }" is somewhat like "1, 2, 3": "1, 2, 3" is not an object, but can appear in square brackets, like in "[0, 1, 2, 3]", or after a method name in a method call, like in "f(1, 2, 3)". There is a syntax to unwrap an array into "1, 2, 3" ("[0, *[1, 2, 3]] == [0, 1, 2, 3]"), which is also appropriately used to wrap "1, 2, 3" into an array in a method call. I would think that blocks and their wrapping procs would behave the same. ---------------------------------------- Bug #8693: lambda invoked by yield acts as a proc with respect to return https://bugs.ruby-lang.org/issues/8693#change-40881 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/