summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-06 15:52:16 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-06 15:52:16 +0000
commit783f1b29087f4e8f11b873c1657dd927b0ecdd49 (patch)
treebaa653a657d0d9a9b96e101813c5fa61655e7db9 /test
parent218ac97bd87c490e46a0dffb6d9dcfdb1374ffca (diff)
merge revision(s) 65554: [Backport #15282]
Don't set throw data as cause [Bug #15282] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@65582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_exception.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb
index 862d46dc3c..605248aebd 100644
--- a/test/ruby/test_exception.rb
+++ b/test/ruby/test_exception.rb
@@ -698,6 +698,12 @@ end.join
assert_same(a, e.cause.cause)
end
+ def test_cause_at_end
+ assert_in_out_err([], <<-'end;', [], [/-: unexpected return\n/, /.*undefined local variable or method `n'.*\n/])
+ END{n}; END{return}
+ end;
+ end
+
def test_raise_with_cause
msg = "[Feature #8257]"
cause = ArgumentError.new("foobar")