Created
May 11, 2010 01:35
-
-
Save anonymous/396799 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
# Taken from add_expr_literal in ActionView::Template::Handlers::Erubis, Rails beta3 | |
ruby-1.9.2-head > BLOCK_EXPR = /(do|\{)(\s*\|[^|]*\|)?\s*\Z/ | |
=> /(do|\{)(\s*\|[^|]*\|)?\s*\Z/ | |
ruby-1.9.2-head > x = 'todo' | |
=> "todo" | |
ruby-1.9.2-head > x =~ BLOCK_EXPR | |
=> 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment