lib/nydp/symbol_lookup.rb in nydp-0.0.6 vs lib/nydp/symbol_lookup.rb in nydp-0.0.7
- old
+ new
@@ -21,10 +21,11 @@
def self.build name, bindings
depth = 0
while Nydp.NIL.isnt? bindings
here = bindings.car
if here.key? name
- return new ContextSymbol.new(depth, name)
+ binding_index = here[name]
+ return new ContextSymbol.new(depth, name, binding_index)
else
depth += 1
bindings = bindings.cdr
end
end