From cda830ff333146b1f4e2b4692ec1f391b88d3e03 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 7 Oct 2003 00:13:29 +0000 Subject: [PATCH] * 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 --- ChangeLog | 5 +++++ test/ruby/test_beginendblock.rb | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 841e686086..4ff14fb641 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 7 09:13:24 2003 Nobuyoshi Nakada + + * test/ruby/test_beginendblock.rb (test_endinmethod): END{} is now + allowed in eval. + Tue Oct 7 04:15:25 2003 Nobuyoshi Nakada * parse.y (stmt): should not expand mrhs if lhs is solely starred. 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