search for: block_arg

Displaying 1 result from an estimated 1 matches for "block_arg".

Did you mean: block_args
2011 Mar 29
0
Issue / code smell in AssociationProxy
...unless @target.respond_to?(method) message = "undefined method `#{method.to_s}'' for \"#{@target}\":#{@target.class.to_s}" raise NoMethodError, message end if block_given? @target.send(method, *args) { |*block_args| yield(*block_args) } else @target.send(method, *args) end end end The smell: load_target may return nil, when it does, the return value of method_missing is nil. BUT the caller may have wanted to call a method on nil. Like #to_yaml ! The ca...