diff options
| author | Akinori MUSHA <knu@idaemons.org> | 2024-10-19 21:56:19 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-10-19 12:56:27 +0000 |
| commit | bfc586b2be70c66062581556e647757cf92804fd (patch) | |
| tree | 911723f79137192966ffc6848ee8b656afe0611f /lib | |
| parent | 7be9a333cabd97a17a2926b15f756f2ef9e57243 (diff) | |
[ruby/ipaddr] Use string interpolation instead of format()
https://github.com/ruby/ipaddr/commit/1f41cd7320
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/ipaddr.rb | 4 |
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 |
