lib/invokr/builder.rb in invokr-0.9.3 vs lib/invokr/builder.rb in invokr-0.9.4
- old
+ new
@@ -29,13 +29,13 @@
build_invocation
end
def build_invocation
@block_arg = @implicit_block if @implicit_block
- if method.is_a? Proc
- Invocation.new :call, @positional_args, @keyword_args, @block_arg
- else
+ if method.respond_to? :name
Invocation.new method.name, @positional_args, @keyword_args, @block_arg
+ else
+ Invocation.new :call, @positional_args, @keyword_args, @block_arg
end
end
def handle_args!
method.parameters.each do |type, identifier|