diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-06 05:07:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-06 05:07:10 +0000 |
commit | dd3ed41cd03f37da856e0af764d8cc8aec952531 (patch) | |
tree | a66f0cbb9b34613aa21db979702d7e867e31863c /test/ruby/test_ast.rb | |
parent | 6629588aa555a21a6849f3b093c21fedf9880c23 (diff) |
ast.c: argument must be a string
[ruby-core:90904] [Bug #15511]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_ast.rb')
-rw-r--r-- | test/ruby/test_ast.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_ast.rb b/test/ruby/test_ast.rb index ed4bcb37c0..d57b60b3f7 100644 --- a/test/ruby/test_ast.rb +++ b/test/ruby/test_ast.rb @@ -134,6 +134,14 @@ class TestAst < Test::Unit::TestCase assert_raise(TypeError) {RubyVM::AbstractSyntaxTree::Node.allocate} end + def test_parse_argument_error + assert_raise(TypeError) {RubyVM::AbstractSyntaxTree.parse(0)} + assert_raise(TypeError) {RubyVM::AbstractSyntaxTree.parse(nil)} + assert_raise(TypeError) {RubyVM::AbstractSyntaxTree.parse(false)} + assert_raise(TypeError) {RubyVM::AbstractSyntaxTree.parse(true)} + assert_raise(TypeError) {RubyVM::AbstractSyntaxTree.parse(:foo)} + end + def test_column_with_long_heredoc_identifier term = "A"*257 ast = RubyVM::AbstractSyntaxTree.parse("<<-#{term}\n""ddddddd\n#{term}\n") |