.to_s
/.inspect
on tuples are not reversable
#10707
Labels
good first issue
This is an issue suited for newcomers to become aquianted with working on the codebase.
help wanted
This issue is generally accepted and needs someone to pick it up
kind:feature
topic:stdlib:collection
I'm programmatically generating some crystal code from a set of hardcoded config files in order to embed the data in the program. (Without the need to ship the config files)
Using a tuple as a key for a hash requires a space after the hash's opening
{
(to prevent the grammar from thinking its a macro) However, when calling .to_s on a hash with a tuple key, the output does not have the space. I always like where .to_s or inspect in other languages creates code you can paste back in if needed.Would it make since to add a space around the
{
and}
of tuples when calling.to_s
?A quick example of the output:
Thanks!
The text was updated successfully, but these errors were encountered: