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

https://github.com/ruby/ipaddr/commit/73f59e111f
This commit is contained in:
Akinori MUSHA 2024-10-19 00:53:29 +09:00 committed by git
parent d1b5c10957
commit 689f14e255

View File

@ -246,7 +246,7 @@ class IPAddr
# Returns a string containing the IP address representation in
# cidr notation
def cidr
format("%s/%s", to_s, prefix)
"#{to_s}/#{prefix}"
end
# Returns a network byte ordered string form of the IP address.