зеркало из https://github.com/github/memcached.git
server: Do not modify hostname when printing
The `<<` operator would modify the original hostname string for the server when calling Server#to_s.
This commit is contained in:
Родитель
0544f5ea56
Коммит
f534ae435f
|
@ -11,7 +11,7 @@ module Memcached
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
s = hostname
|
s = hostname.dup
|
||||||
s << ":#{port}" if 0 != port
|
s << ":#{port}" if 0 != port
|
||||||
s << ":#{weight}" if weight
|
s << ":#{weight}" if weight
|
||||||
s
|
s
|
||||||
|
|
Загрузка…
Ссылка в новой задаче