N
Navindra Umanee
Hi,
Why is it that multi-line strings that begin with """ close themselves
when a single " is encountered?
irb(main):006:0> """
irb(main):007:0" This is a multi-line string
irb(main):008:0" with a "
=> "\nThis is a multi-line string\nwith a "
I find this to be somewhat annoying. The Python way seems preferable:
... In this string I can have isolated "s without worry
... the only way to end the string is with """
'\nIn this string I can have isolated "s without worry\nthe only way to end thestring is with '
Any chance this behavior will change in the next Ruby?
Thanks,
Navin.
Why is it that multi-line strings that begin with """ close themselves
when a single " is encountered?
irb(main):006:0> """
irb(main):007:0" This is a multi-line string
irb(main):008:0" with a "
=> "\nThis is a multi-line string\nwith a "
I find this to be somewhat annoying. The Python way seems preferable:
... In this string I can have isolated "s without worry
... the only way to end the string is with """
'\nIn this string I can have isolated "s without worry\nthe only way to end thestring is with '
Any chance this behavior will change in the next Ruby?
Thanks,
Navin.