lib/raap/symbolic_caller.rb in raap-0.8.0 vs lib/raap/symbolic_caller.rb in raap-0.9.0

- old
+ new

@@ -146,12 +146,20 @@ end def eval_one(symbolic_call) symbolic_call => [:call, receiver_value, method_name, args, kwargs, block] if @allow_private - receiver_value.__send__(method_name, *args, **kwargs, &block) + if kwargs.empty? + receiver_value.__send__(method_name, *args, &block) + else + receiver_value.__send__(method_name, *args, **kwargs, &block) + end else - BindCall.public_send(receiver_value, method_name, *args, **kwargs, &block) + if kwargs.empty? + BindCall.public_send(receiver_value, method_name, *args, &block) + else + BindCall.public_send(receiver_value, method_name, *args, **kwargs, &block) + end end end def var_name(mod) printable(mod).gsub('::', '_').downcase