From 9738f96fcfe50b2a605e350bdd40bd7a85665f54 Mon Sep 17 00:00:00 2001 From: ktsj Date: Wed, 17 Apr 2019 06:48:03 +0000 Subject: Introduce pattern matching [EXPERIMENTAL] [ruby-core:87945] [Feature #14912] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/pp.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/pp.rb b/lib/pp.rb index cbc49e72e9..ef559eff7c 100644 --- a/lib/pp.rb +++ b/lib/pp.rb @@ -537,6 +537,10 @@ class RubyVM::AbstractSyntaxTree::Node pretty_print_children(q, %w[pre_num pre_init opt first_post post_num post_init rest kw kwrest block]) when :DEFN pretty_print_children(q, %w[mid body]) + when :ARYPTN + pretty_print_children(q, %w[const pre rest post]) + when :HSHPTN + pretty_print_children(q, %w[const kw kwrest]) else pretty_print_children(q) end -- cgit v1.2.3