mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merge revision(s) 15541,15545,15558:
* parse.y (yycompile): clear ruby_eval_tree_begin too before parse. * parse.y (yycompile): clear ruby_eval_tree_begin if parse failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
823be2d795
commit
9de707ad30
4 changed files with 23 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue