diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2023-09-15 18:38:31 -0400 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2023-09-18 17:48:52 +0000 |
| commit | 1636f6abd62c03f77777d83324df3bfcedbe66c2 (patch) | |
| tree | 43b3734dd376ba36edd756e85b430e92910f0828 /lib | |
| parent | 54e676a88ba1a68b7302a32dad8c44197b55d5fe (diff) | |
[ruby/yarp] Use compact_child_nodes where possible
https://github.com/ruby/yarp/commit/c1911fa9b1
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/yarp.rb | 2 | ||||
| -rw-r--r-- | lib/yarp/pattern.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/yarp.rb b/lib/yarp.rb index 48b1f173dd..28f0fae003 100644 --- a/lib/yarp.rb +++ b/lib/yarp.rb @@ -520,7 +520,7 @@ module YARP locals << [] if node.once? end - stack.concat(node.child_nodes.compact) + stack.concat(node.compact_child_nodes) end locals diff --git a/lib/yarp/pattern.rb b/lib/yarp/pattern.rb index 339f1506c3..f7519137e4 100644 --- a/lib/yarp/pattern.rb +++ b/lib/yarp/pattern.rb @@ -73,7 +73,7 @@ module YARP while (node = queue.shift) yield node if @compiled.call(node) - queue.concat(node.child_nodes.compact) + queue.concat(node.compact_child_nodes) end end |
