diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-20 17:30:07 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-20 17:30:07 +0000 |
commit | 929223e720abf8166cc44c1cfd126b6c00aa9eea (patch) | |
tree | 312db264969c07cf9fa35eddd6b14bb528dde761 /test | |
parent | 320e6b0837d44d0d75c75369e6be39ff74c483ff (diff) |
* test/ruby/test_beginendblock.rb (test_begin_and_eval): add test for
http://sourceforge.net/mailarchive/message.php?msg_name=47B2FD16.6040408%40vvvvvv.sakura.ne.jp
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_beginendblock.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_beginendblock.rb b/test/ruby/test_beginendblock.rb index 656dd4f598..b5d898d3b6 100644 --- a/test/ruby/test_beginendblock.rb +++ b/test/ruby/test_beginendblock.rb @@ -83,4 +83,16 @@ EOW assert_nil $?.exitstatus assert_equal Signal.list["INT"], $?.termsig end + + def test_begin_and_eval + $test_begin_and_eval = :ok + begin + eval("BEGIN{$test_begin_and_eval = :ng}\n_/a:a") + rescue SyntaxError + x1 = x2 = $test_begin_and_eval + eval("x2 = $test_begin_and_eval") + end + assert_equal(:ok, x1) + assert_equal(:ok, x2) + end end |