[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 end
# Returns a json string containing the IP address representation. # Returns a json string containing the IP address representation.
def to_json(*) def to_json(*a)
format("\"%s\"", as_json) %Q{"#{as_json(*a)}"}
end end
# Returns a string containing the IP address representation in # Returns a string containing the IP address representation in