Last active
December 22, 2015 16:59
-
-
Save RadicalZephyr/6502948 to your computer and use it in GitHub Desktop.
Show case a macruby bug with regex syntax
This file contains hidden or 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
puts %r{hello}.match("hello") | |
brokenreg = %r{ | |
hello #stuff happens | |
$ # end of line | |
}x | |
definition = %r{ | |
^ # begin of line | |
[ ]{0,3} # up to 3 spaces | |
: # colon | |
\s* # whitespace | |
(\S.*) # the text = $1 | |
$ # end of line | |
} | |
definition = %r{ | |
^ # begin of line | |
[ ]{0,3} # up to 3 spaces | |
: # colon | |
\s* # whitespace | |
(\S.*) # the text = $1 | |
$ # end of line | |
}x | |
puts "Hello, MacRuby!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment