From fb38cfb90fcd467e398cbfc13aa99cf38c569311 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 22 Sep 2017 11:21:34 +0000 Subject: 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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sample/trick2013/yhara/entry.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sample') diff --git a/sample/trick2013/yhara/entry.rb b/sample/trick2013/yhara/entry.rb index a2deb54399..ce125ed3df 100644 --- a/sample/trick2013/yhara/entry.rb +++ b/sample/trick2013/yhara/entry.rb @@ -2,7 +2,7 @@ def _(&b)$><<->(x){x ? (String===x ?x.upcase: (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 } -- cgit v1.2.3