ruby-changes:55875
From: Nobuyoshi <ko1@a...>
Date: Tue, 28 May 2019 11:39:24 +0900 (JST)
Subject: [ruby-changes:55875] Nobuyoshi Nakada: 72333286c4 (trunk): Fix typos in Ripper::Lexer#inspect and Ripper::Lexer#pretty_print
https://git.ruby-lang.org/ruby.git/commit/?id=72333286c4 From 72333286c45ac821e227ad62d810a09a0208ecbb Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 28 May 2019 11:38:13 +0900 Subject: Fix typos in Ripper::Lexer#inspect and Ripper::Lexer#pretty_print diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb index 3301a60..a5ba5b6 100644 --- a/ext/ripper/lib/ripper/lexer.rb +++ b/ext/ripper/lib/ripper/lexer.rb @@ -66,13 +66,13 @@ class Ripper https://github.com/ruby/ruby/blob/trunk/ext/ripper/lib/ripper/lexer.rb#L66 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) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/