[#97678] [Ruby master Feature#16752] :private param for const_set — bughitgithub@...
Issue #16752 has been reported by bughit (bug hit).
5 messages
2020/04/02
[ruby-core:97833] [Ruby master Feature#16779] Add sprintf %q format option
From:
bryan@...
Date:
2020-04-11 18:06:16 UTC
List:
ruby-core #97833
Issue #16779 has been reported by gearnode (Bryan Frimin).
----------------------------------------
Feature #16779: Add sprintf %q format option
https://bugs.ruby-lang.org/issues/16779
* Author: gearnode (Bryan Frimin)
* Status: Open
* Priority: Normal
----------------------------------------
It would be great if sprintf format option for quoted string (like golang sprintf),
it's particularly useful to format log for example.
Currently we have to do this:
``` ruby
sprintf("%s", some_value.inspect.dump)
```
I propose to introduce the `%q` format option which allow to do this:
```ruby
sprintf("%q", some_value)
```
---Files--------------------------------
add-quoted-string-sprintf-format.patch (1.52 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>