Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
Description
When formatting strings with String.new the formatting rules select single or double quotes depending on the contents of the string. If it can be output as a single quoted string it will produce single quote delimiters, otherwise double quote.
This is bad when the result must have double quotes and there is currently no way to force the string formatter to enforce double quotes.
To support this, we can add support for "alternate form" using # to the %p format and let that mean "use double quotes" - this then applies to all string format that produce a quoted output.