Created
April 6, 2014 07:54
-
-
Save vzvu3k6k/10002755 to your computer and use it in GitHub Desktop.
A simple test for zenspider/enhanced-ruby-mode#47
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
# This is a simple test for https://github.com/zenspider/enhanced-ruby-mode/pull/47 | |
# | |
# 0. Install rbenv | |
# 1. Save this as "test.rb" | |
# 2. Install rbenv-each (https://github.com/chriseppstein/rbenv-each) | |
# 3. Run `rbenv each ruby test.rb` | |
require 'ripper' | |
result = Ripper.lex <<HERE | |
foo | |
.bar | |
HERE | |
expected = [[[1, 0], :on_ident, "foo"], | |
[[1, 3], :on_period, "\n"], | |
[[2, 0], :on_ident, " .bar"], | |
[[2, 6], :on_nl, "\n"]] | |
puts "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}: #{result == expected}" |
Author
vzvu3k6k
commented
Apr 6, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment