summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori MUSHA <[email protected]>2024-10-19 21:56:19 +0900
committergit <[email protected]>2024-10-19 12:56:27 +0000
commitbfc586b2be70c66062581556e647757cf92804fd (patch)
tree911723f79137192966ffc6848ee8b656afe0611f
parent7be9a333cabd97a17a2926b15f756f2ef9e57243 (diff)
[ruby/ipaddr] Use string interpolation instead of format()
https://github.com/ruby/ipaddr/commit/1f41cd7320
-rw-r--r--lib/ipaddr.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ipaddr.rb b/lib/ipaddr.rb
index dc33fffcb5..e802c8817e 100644
--- a/lib/ipaddr.rb
+++ b/lib/ipaddr.rb
@@ -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