[ruby/ipaddr] Use string interpolation instead of format()

https://github.com/ruby/ipaddr/commit/1f41cd7320
This commit is contained in:
Akinori MUSHA 2024-10-19 21:56:19 +09:00 committed by git
parent 7be9a333ca
commit bfc586b2be

View File

@ -239,8 +239,8 @@ class IPAddr
end
# Returns a json string containing the IP address representation.
def to_json(*)
format("\"%s\"", as_json)
def to_json(*a)
%Q{"#{as_json(*a)}"}
end
# Returns a string containing the IP address representation in