aboutsummaryrefslogtreecommitdiffstats
path: root/lib/pp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pp.rb')
-rw-r--r--lib/pp.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pp.rb b/lib/pp.rb
index bb504bc1b4..ad0391c012 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -529,13 +529,13 @@ class RubyVM::AbstractSyntaxTree::Node
end
def pretty_print(q)
- q.group(1, "(#{type.sub(/\ANODE_/,'')}@#{first_lineno}:#{first_column}-#{last_lineno}:#{last_column}", ")") {
+ q.group(1, "(#{type}@#{first_lineno}:#{first_column}-#{last_lineno}:#{last_column}", ")") {
case type
- when "NODE_SCOPE"
+ when :SCOPE
pretty_print_children(q, %w"tbl args body")
- when "NODE_ARGS"
+ when :ARGS
pretty_print_children(q, %w[pre_num pre_init opt first_post post_num post_init rest kw kwrest block])
- when "NODE_DEFN"
+ when :DEFN
pretty_print_children(q, %w[mid body])
else
pretty_print_children(q)