lib/pelusa/lint/indentation_level.rb in pelusa-0.2.3 vs lib/pelusa/lint/indentation_level.rb in pelusa-0.2.4

- old
+ new

@@ -24,11 +24,11 @@ def iterate_lines!(klass) # we want to find all nodes inside define blocks that # contain > 1 indentation levels # this method totally fails the IndentationLevel level lint :P ClassAnalyzer.walk(klass) do |node| - if node.is_a?(Rubinius::AST::Define) + if node.is_a?(Rubinius::ToolSets::Runtime::ToolSet::AST::Define) # we're inside a method body, so see if we indent anywhere ClassAnalyzer.walk(node) do |inner_node| if inner_body = get_body_from_node[inner_node] # if it turns out there's an indented value in there, that # could be okay -- walk that node to see if there's a 2nd level @@ -51,10 +51,10 @@ end end def get_body_from_node lambda do |node| - if node.respond_to?(:body) && !node.body.is_a?(Rubinius::AST::NilLiteral) + if node.respond_to?(:body) && !node.body.is_a?(Rubinius::ToolSets::Runtime::ToolSet::AST::NilLiteral) node.body elsif node.respond_to?(:else) node.else end end