Created
June 26, 2009 14:36
-
-
Save crash2burn/136535 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ruby bug or is it part of the "rules" that you cannot do this: | |
# Alone, works fine | |
>> 'a'.gsub("'",'\\\'') | |
=> "a" | |
# Inside a string in #{} - bombs | |
>> "hi #{'a'.gsub("'",'\\\'')}" | |
[just waits for another "] | |
" | |
SyntaxError: compile error | |
(irb):20: unterminated string meets end of file | |
from (irb):20 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment