1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix typos in Ripper::Lexer#inspect and Ripper::Lexer#pretty_print

This commit is contained in:
Nobuyoshi Nakada 2019-05-28 11:38:13 +09:00
parent ccfb12d76c
commit 72333286c4
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -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)