diff options
Diffstat (limited to 'test/ruby/test_parse.rb')
-rw-r--r-- | test/ruby/test_parse.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 030442f9e9..d2fc5f0721 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -1001,6 +1001,12 @@ x = __ENCODING__ end; end + def test_unexpected_token_error + assert_raise(SyntaxError) do + eval('"x"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') + end + end + =begin def test_past_scope_variable assert_warning(/past scope/) {catch {|tag| eval("BEGIN{throw tag}; tap {a = 1}; a")}} |