lib/to_source/visitor.rb in to_source-0.1.0 vs lib/to_source/visitor.rb in to_source-0.1.1
- old
+ new
@@ -24,9 +24,18 @@
def local_variable_access(node, parent)
emit node.name
end
+ def instance_variable_assignment(node, parent)
+ emit "%s = " % node.name
+ node.value.lazy_visit self, node
+ end
+
+ def instance_variable_access(node, parent)
+ emit node.name
+ end
+
def fixnum_literal(node, parent)
emit node.value.to_s
end
def float_literal(node, parent)