diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-20 12:11:25 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-20 12:11:25 +0000 |
commit | 158f223586a6eb6ed652f1e81b39ae914d52d16d (patch) | |
tree | 73d04b25c513ae67dfd336837d7be7f4359e790b /test/ruby/test_ast.rb | |
parent | f194979baec7d84b31d054813cff0e3ec80dc29c (diff) | |
download | ruby-158f223586a6eb6ed652f1e81b39ae914d52d16d.tar.gz |
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
Diffstat (limited to 'test/ruby/test_ast.rb')
-rw-r--r-- | test/ruby/test_ast.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |