From 158f223586a6eb6ed652f1e81b39ae914d52d16d Mon Sep 17 00:00:00 2001 From: yui-knk Date: Wed, 20 Jun 2018 12:11:25 +0000 Subject: test_ast.rb: Fix an argument of `grep`, child is a `RubyVM::AST::Node` Yusuke Endoh pointed out coverage of ast module is very low. Thanks! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_ast.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/ruby/test_ast.rb b/test/ruby/test_ast.rb index 5659cac6b0..b2926eb5be 100644 --- a/test/ruby/test_ast.rb +++ b/test/ruby/test_ast.rb @@ -72,7 +72,7 @@ class TestAst < Test::Unit::TestCase def validate_range0(node) beg_pos, end_pos = node.beg_pos, node.end_pos - children = node.children.grep(RubyVM::AST) + children = node.children.grep(RubyVM::AST::Node) return true if children.empty? # These NODE_D* has NODE_ARRAY as nd_next->nd_next whose last locations @@ -100,7 +100,7 @@ class TestAst < Test::Unit::TestCase def validate_not_cared0(node) beg_pos, end_pos = node.beg_pos, node.end_pos - children = node.children.grep(RubyVM::AST) + children = node.children.grep(RubyVM::AST::Node) @errors << { type: :first_lineno, node: node } if beg_pos.lineno == 0 @errors << { type: :first_column, node: node } if beg_pos.column == -1 -- cgit v1.2.3