Skip to content

Instantly share code, notes, and snippets.

@textarcana
Created June 9, 2009 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save textarcana/126552 to your computer and use it in GitHub Desktop.
Save textarcana/126552 to your computer and use it in GitHub Desktop.
def test_def_paren
tokenize( "def foo(bar)" )
assert_next_token :keyword, "def "
assert_next_token :method, "foo"
assert_next_token :punct, "("
assert_next_token :ident, "bar"
assert_next_token :punct, ")"
end
# See <http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/7764e449b7fe7864>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment