summaryrefslogtreecommitdiff
path: root/test/ruby/test_beginendblock.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-07 00:13:29 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-07 00:13:29 +0000
commitcda830ff333146b1f4e2b4692ec1f391b88d3e03 (patch)
tree6b856db14a1bd507ca2e01fec765cd97b5de9799 /test/ruby/test_beginendblock.rb
parent6fc88be3d97172841ad099a9489ed80d8ecae5de (diff)
* test/ruby/test_beginendblock.rb (test_endinmethod): END{} is now
allowed in eval. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_beginendblock.rb')
-rw-r--r--test/ruby/test_beginendblock.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/ruby/test_beginendblock.rb b/test/ruby/test_beginendblock.rb
index 8fee163996..2e1940f0b7 100644
--- a/test/ruby/test_beginendblock.rb
+++ b/test/ruby/test_beginendblock.rb
@@ -17,8 +17,11 @@ class TestBeginEndBlock < Test::Unit::TestCase
end
def test_endinmethod
- assert_raises(SyntaxError) do
+ verbose, $VERBOSE = $VERBOSE, nil
+ assert_nothing_raised(SyntaxError) do
eval("def foo; END {}; end")
end
+ ensure
+ $VERBOSE = verbose
end
end