lib/delorean/base.rb in delorean_lang-0.3.33 vs lib/delorean/base.rb in delorean_lang-0.3.34

- old
+ new

@@ -232,11 +232,13 @@ _e[:_engine].parse_check_call_fn(method, args.count, obj) return obj.send(msg, *args) end cls = obj.class - sig = (cls < Delorean::Model && cls.delorean_instance_methods[msg]) || - RUBY_WHITELIST[msg] + sig = cls < Delorean::Model && + cls.ancestors.lazy.map do |an| + cls.delorean_instance_methods[[an, msg]] + end.find{|i|i} || RUBY_WHITELIST[msg] raise "no such method #{method}" unless sig # if sig is a string, then method mapped to another name return _instance_call(obj, sig, args, _e) if sig.is_a? String