aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_ast.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-03 06:53:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-03 06:53:14 +0000
commit002f6ea856f14d516b8e5e9c8d15f38240ece738 (patch)
tree6dcc2c09774195797a31ea4544fb4a9202b8000e /test/ruby/test_ast.rb
parent64712906b063d5470f74ef0b19d16e4aa84defdf (diff)
downloadruby-002f6ea856f14d516b8e5e9c8d15f38240ece738.tar.gz
ast.c: allocator of Node
* ast.c (Init_ast): undefine allocator of Node, as a method call on an uninitialized Node causes segfault. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_ast.rb')
-rw-r--r--test/ruby/test_ast.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_ast.rb b/test/ruby/test_ast.rb
index f59b54c17a..27c6753a7e 100644
--- a/test/ruby/test_ast.rb
+++ b/test/ruby/test_ast.rb
@@ -129,6 +129,10 @@ class TestAst < Test::Unit::TestCase
end
end
+ def test_allocate
+ assert_raise(TypeError) {RubyVM::AST::Node.allocate}
+ end
+
def test_column_with_long_heredoc_identifier
term = "A"*257
ast = RubyVM::AST.parse("<<-#{term}\n""ddddddd\n#{term}\n")