ruby-changes:47868
From: nobu <ko1@a...>
Date: Sat, 23 Sep 2017 08:43:05 +0900 (JST)
Subject: [ruby-changes:47868] nobu:r59989 (trunk): Update trick2013/yhara for Ruby 2.4
nobu 2017-09-22 20:21:34 +0900 (Fri, 22 Sep 2017) New Revision: 59989 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59989 Log: Update trick2013/yhara for Ruby 2.4 I need to raise LocalJumpError here (for the first "J" of the output "JUST ANOTHER RUBY HACKER"), but this `return` does not raise error in Ruby 2.4. [Fix GH-1703] Author: Yutaka HARA <yutaka.hara+github@g...> Modified files: trunk/sample/trick2013/yhara/entry.rb Index: sample/trick2013/yhara/entry.rb =================================================================== --- sample/trick2013/yhara/entry.rb (revision 59988) +++ sample/trick2013/yhara/entry.rb (revision 59989) @@ -2,7 +2,7 @@ def _(&b)$><<->(x){x ? (String===x ?x.up https://github.com/ruby/ruby/blob/trunk/sample/trick2013/yhara/entry.rb#L2 (Class===x ? x : x.class).name[$a?0:($a=5)]): " "}[ begin b[];rescue Exception;$!;end ] end -_ { return } +_ { yield } _ { method(:p).unbind } _ { eval "{ " } _ { Thread.current.join } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/