From: Mayank Kohaley Date: 2011-04-06T21:12:52+09:00 Subject: [ruby-core:35629] [Ruby 1.9 - Bug #4473] Calling return within begin still executes else Issue #4473 has been updated by Mayank Kohaley. I can see the same issue happening on Windows also. ---------------------------------------- Bug #4473: Calling return within begin still executes else http://redmine.ruby-lang.org/issues/4473 Author: Todd Huss Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.6.0] I see this issue in 1.9.2-p0 through the current version 1.9.2-p136 on Mac OS X. The following code prints 'else executed'. Whereas in Ruby 1.8.x it would not execute the else statement if you called return from within a begin block. In summary, I would expect the following code to not print anything, but in Ruby 1.9.2 it actually prints 'else executed': # This code prints 'else executed' def test_return_in_method begin return rescue puts 'rescue executed' else puts 'else executed' end end test_return_in_method -- http://redmine.ruby-lang.org