lib/formulae/run/excel_functions.rb in rubyfromexcel-0.0.16 vs lib/formulae/run/excel_functions.rb in rubyfromexcel-0.0.17
- old
+ new
@@ -73,11 +73,11 @@
def set(cell,value)
instance_variable_name = "@#{cell}"
unless instance_variable_defined?(instance_variable_name)
self.class.class_eval do
- if method_defined?(cell)
+ if method_defined?(cell) && !method_defined?("old_#{cell}")
alias_method "old_#{cell}", cell
define_method(cell) do
instance_variable_get(instance_variable_name) || self.send("old_#{cell}")
end
end
@@ -486,6 +486,6 @@
reference = parsed_reference.visit(RuntimeFormulaBuilder.new(self,refering_cell && Reference.new(refering_cell)))
formula_cache[[:indirect_result,reference]] ||= eval(reference)
end
end
-end
\ No newline at end of file
+end