diff options
author | apolcyn <apolcyn@google.com> | 2018-09-20 00:07:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-20 00:07:03 -0700 |
commit | dc09ab5b37cad9a29f1bb2a99644214c8dc1af10 (patch) | |
tree | 5171fbc3563feb1e05103a853e44c6b0baa0a83b /src/ruby | |
parent | f6e7b778c42da01610f914271ccddee49becb2fa (diff) | |
parent | d374ee9a4f2bf6945f296fe9894aecbbed496f45 (diff) |
Merge pull request #16642 from tenderlove/send-instead-of-method
Switch to `send` instead of `method(...).call`
Diffstat (limited to 'src/ruby')
-rw-r--r-- | src/ruby/lib/grpc/generic/rpc_desc.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ruby/lib/grpc/generic/rpc_desc.rb b/src/ruby/lib/grpc/generic/rpc_desc.rb index 5fd1805aab..efb0e4233d 100644 --- a/src/ruby/lib/grpc/generic/rpc_desc.rb +++ b/src/ruby/lib/grpc/generic/rpc_desc.rb @@ -32,7 +32,7 @@ module GRPC # @return [Proc] { |instance| marshalled(instance) } def marshal_proc - proc { |o| o.class.method(marshal_method).call(o).to_s } + proc { |o| o.class.send(marshal_method, o).to_s } end # @param [:input, :output] target determines whether to produce the an @@ -42,9 +42,9 @@ module GRPC # @return [Proc] An unmarshal proc { |marshalled(instance)| instance } def unmarshal_proc(target) fail ArgumentError unless [:input, :output].include?(target) - unmarshal_class = method(target).call + unmarshal_class = send(target) unmarshal_class = unmarshal_class.type if unmarshal_class.is_a? Stream - proc { |o| unmarshal_class.method(unmarshal_method).call(o) } + proc { |o| unmarshal_class.send(unmarshal_method, o) } end def handle_request_response(active_call, mth, inter_ctx) |