summaryrefslogtreecommitdiff
path: root/ext/ripper/lib/ripper/lexer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ripper/lib/ripper/lexer.rb')
-rw-r--r--ext/ripper/lib/ripper/lexer.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb
index b7735fc..bb59080 100644
--- a/ext/ripper/lib/ripper/lexer.rb
+++ b/ext/ripper/lib/ripper/lexer.rb
@@ -50,8 +50,7 @@ class Ripper
class Elem
class List < ::Array
def inspect
- pos, event, tok, state = self
- [pos, event, tok, Ripper.lex_state_name(state)].inspect
+ super.sub!(/\d+(?=\]\z)/, Ripper.lex_state_name(self[3]))
end
def pretty_print(q) # :nodoc: