aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby/lib
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2016-05-11 11:04:06 -0700
committerGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2016-05-11 11:04:06 -0700
commitf624a796e794750ea243341da2d56462204ae9a8 (patch)
treed3ba0437ae779cc883f157f8280fbc8a04303eab /src/ruby/lib
parentc8b25434a30bc8e9e0dbbc303b7fdcc19a3e1ec8 (diff)
parent0840b857726323b6cd274662aa166164528de521 (diff)
Merge pull request #6537 from grpc/release-0_14
Upmerge from 0.14.0, again :D
Diffstat (limited to 'src/ruby/lib')
-rw-r--r--src/ruby/lib/grpc/generic/client_stub.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ruby/lib/grpc/generic/client_stub.rb b/src/ruby/lib/grpc/generic/client_stub.rb
index 68e167a69f..12946fe819 100644
--- a/src/ruby/lib/grpc/generic/client_stub.rb
+++ b/src/ruby/lib/grpc/generic/client_stub.rb
@@ -49,7 +49,12 @@ module GRPC
fail(TypeError, '!Channel') unless alt_chan.is_a?(Core::Channel)
return alt_chan
end
- kw['grpc.primary_user_agent'] = "grpc-ruby/#{VERSION}"
+ if kw['grpc.primary_user_agent'].nil?
+ kw['grpc.primary_user_agent'] = ''
+ else
+ kw['grpc.primary_user_agent'] += ' '
+ end
+ kw['grpc.primary_user_agent'] += "grpc-ruby/#{VERSION}"
unless creds.is_a?(Core::ChannelCredentials) || creds.is_a?(Symbol)
fail(TypeError, '!ChannelCredentials or Symbol')
end