From: bugmenot bugmenot Date: 2009-07-05T17:54:13+09:00 Subject: [ruby-core:24146] [Bug #1729] Returning ignores ensure section when inside lambda Bug #1729: Returning ignores ensure section when inside lambda http://redmine.ruby-lang.org/issues/show/1729 Author: bugmenot bugmenot Status: Open, Priority: Normal ruby -v: ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux] The following code does not run the code inside the ensure section when run in Ruby 1.9.1. When run under Ruby 1.8.7, the ensure section is correctly run. Is there any reason for this change in behavior? foo = lambda do begin return ensure puts "hi mom" end end foo.call ---------------------------------------- http://redmine.ruby-lang.org