From: usa@... Date: 2014-01-29T03:55:55+00:00 Subject: [ruby-core:60191] [ruby-trunk - Bug #9308] def's return value causes errors Issue #9308 has been updated by Usaku NAKAMURA. Backport changed from 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: REQUIRED to 1.9.3: DONE, 2.0.0: REQUIRED, 2.1: REQUIRED backported to ruby_1_9_3 at r44737. ---------------------------------------- Bug #9308: def's return value causes errors https://bugs.ruby-lang.org/issues/9308#change-44673 * Author: Benjamin Kammerl * Status: Closed * Priority: Normal * Assignee: * Category: core * Target version: next minor * ruby -v: ruby 2.1.0dev (2013-11-23 trunk 43807) [x86_64-linux] * Backport: 1.9.3: DONE, 2.0.0: REQUIRED, 2.1: REQUIRED ---------------------------------------- It seems 2.1 hase some trouble with the "do" keyword in combination with the private/public/protected keywords and the def's return value: Works: https://gist.github.com/phortx/8146341 Works Not: https://gist.github.com/phortx/8146345 $ ruby --version ruby 2.1.0dev (2013-11-23 trunk 43807) [x86_64-linux] $ ruby works.rb $ ruby works_not.rb test.rb:5: syntax error, unexpected keyword_do_block, expecting keyword_end test.rb:12: syntax error, unexpected keyword_end, expecting end-of-input -- http://bugs.ruby-lang.org/