From bfc586b2be70c66062581556e647757cf92804fd Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Sat, 19 Oct 2024 21:56:19 +0900 Subject: [PATCH] [ruby/ipaddr] Use string interpolation instead of format() https://github.com/ruby/ipaddr/commit/1f41cd7320 --- lib/ipaddr.rb | 4 ++-- 1 file 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