lib/neovim/remote_object.rb in neovim-0.7.0 vs lib/neovim/remote_object.rb in neovim-0.7.1

- old
+ new

@@ -21,18 +21,18 @@ packer.pack(@index) end # Intercept method calls and delegate to appropriate RPC methods. def method_missing(method_name, *args) - if func = @api.function_for_object_method(self, method_name) + if (func = @api.function_for_object_method(self, method_name)) func.call(@session, @index, *args) else super end end - # Extend +respond_to?+ to support RPC methods. - def respond_to?(method_name, *) + # Extend +respond_to_missing?+ to support RPC methods. + def respond_to_missing?(method_name, *) super || rpc_methods.include?(method_name.to_sym) end # Extend +methods+ to include RPC methods def methods(*args)