Permalink
Browse files

Filter out leading nil's where E[node.position, ....] is called and n…

…ode does not have a position set
  • Loading branch information...
vidarh committed Sep 25, 2014
1 parent e19a85d commit af00ab3707897e0916bb5500ca44a7fe6cf41db1
Showing with 1 addition and 1 deletion.
  1. +1 −1 ast.rb
View
2 ast.rb
@@ -36,7 +36,7 @@ def update_position
end
def self.[](*args)
if args.size > 0 && args.first.is_a?(Scanner::Position)
if args.size > 0 and args.first.is_a?(Scanner::Position) || args.first.nil?
pos = args.shift
end
e = super(*args)

0 comments on commit af00ab3

Please sign in to comment.