boot/rbx-compiler/compiler/ast/identifier.rb in fancy-0.3.0 vs boot/rbx-compiler/compiler/ast/identifier.rb in fancy-0.3.1
- old
+ new
@@ -109,10 +109,14 @@
elsif false?
g.push_false
elsif nil?
g.push_nil
else
- Rubinius::AST::LocalVariableAccess.new(line, name).bytecode(g)
+ if g.state.scope.search_local(name)
+ Rubinius::AST::LocalVariableAccess.new(@line, name).bytecode(g)
+ else
+ MessageSend.new(line, Self.new(line), self, MessageArgs.new(line)).bytecode(g)
+ end
end
end
end
end