mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
f194979bae
commit
158f223586
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue