summaryrefslogtreecommitdiff
path: root/ext/ripper/lib
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-05-28 11:38:13 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-05-28 11:38:13 +0900
commit72333286c45ac821e227ad62d810a09a0208ecbb (patch)
tree3ada474c660bc1c17aa46ad3d92dc786d6a1e612 /ext/ripper/lib
parentccfb12d76ca58957cb95692594626169a97224b7 (diff)
Fix typos in Ripper::Lexer#inspect and Ripper::Lexer#pretty_print
Diffstat (limited to 'ext/ripper/lib')
-rw-r--r--ext/ripper/lib/ripper/lexer.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb
index 3301a6078c6..a5ba5b68907 100644
--- a/ext/ripper/lib/ripper/lexer.rb
+++ b/ext/ripper/lib/ripper/lexer.rb
@@ -66,13 +66,13 @@ class Ripper
end
def inspect
- "#<#{self.class}: #{event}@#{pos[0]}:#{pos[0]}:#{state}: #{tok.inspect}>"
+ "#<#{self.class}: #{event}@#{pos[0]}:#{pos[1]}:#{state}: #{tok.inspect}>"
end
def pretty_print(q)
q.group(2, "#<#{self.class}:", ">") {
q.breakable
- q.text("#{event}@#{pos[0]}:#{pos[0]}")
+ q.text("#{event}@#{pos[0]}:#{pos[1]}")
q.breakable
q.text("token: ")
tok.pretty_print(q)