lib/delorean/base.rb in delorean_lang-0.4.2 vs lib/delorean/base.rb in delorean_lang-0.4.4
- old
+ new
@@ -92,11 +92,11 @@
def cloned_params
# FIXME: evaluate() modifies params! => need to clone it.
# This is pretty awful. NOTE: can't sanitize params as Marty
# patches NodeCall and modifies params to send _parent_id.
# This whole thing needs to be redone.
- @cp ||= params.clone
+ @cp ||= Hash[params]
end
def evaluate(attr)
engine.evaluate(node, attr, cloned_params)
end
@@ -256,15 +256,10 @@
raise "bad arg #{i}, method #{method}: #{ai}/#{ai.class} #{s}" unless
(s.member?(nil) && i>=arglist.length) ||
s.detect {|sc| sc && ai.class <= sc}
end
- res = obj.send(msg, *args)
- # FIXME: can't freeze AR relations since then we can't chain
- # calls (e.g. the chaining modifies the relation object. Not
- # sure what this side-effect means. Delorean code which
- # perform queries on queries seems to work.
- (ActiveRecord::Relation === res || Class === res) ? res : res.freeze
+ obj.send(msg, *args)
end
######################################################################
end
end