Last active
December 18, 2015 15:09
-
-
Save rickhull/5802332 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
[1] pry(main)> rgx = %r{ | |
[1] pry(main)* . # match any char; this comment contains an end brace } | |
=> / | |
. # match any char; this comment contains an end brace / | |
[2] pry(main)> }x | |
SyntaxError: unexpected '}', expecting $end |
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
# syntax error on extended regex when delimiter is present in comments | |
rgx = / | |
. # match any char; this comment contains a slash / | |
/x | |
# syntax error before we reach here | |
'foo'.match rgx # expected #<MatchData "f"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment