summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-24 02:38:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-24 02:38:27 +0000
commit2e5cf0b7116751344ebefda08a70ca2de570c89b (patch)
tree5118fce12256c38fbd772973c4a41735e68c3097 /test
parentc03c03cc11ca59dd8e93e769297f99aaf0826652 (diff)
compile.c: toplevel return arguments
* compile.c (compile_return): evaluate arguments to top-level return but ignore the results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_syntax.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index 5582c70556..aa82f52987 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -1006,6 +1006,7 @@ eom
begin raise; ensure return; end; self
begin raise; ensure return; end and self
nil&defined?0--begin e=no_method_error(); return; 0;end
+ return puts('ignored') #=> ignored
end;
.split(/\n/).map {|s|[(line+=1), *s.split(/#=> /, 2)]}
failed = proc do |n, s|