summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2023-08-17 20:03:06 -0400
committergit <svn-admin@ruby-lang.org>2023-08-18 00:06:57 +0000
commit995fd11bdec4d84710249aef66a07b88e6b9bf46 (patch)
treef8815e02bdf21e85ed727d1ac9e338f865588eb8
parente913431687f2fffb1a8cc435e60c95eea887b087 (diff)
[ruby/yarp] Remove strange :"#arg_rest" local
https://github.com/ruby/yarp/commit/66ecec218d
-rw-r--r--lib/yarp.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/yarp.rb b/lib/yarp.rb
index 30f361df07..aa92113d2c 100644
--- a/lib/yarp.rb
+++ b/lib/yarp.rb
@@ -381,6 +381,10 @@ module YARP
# of those here.
names = names.grep_v(/^_\d$/)
+ # For some reason, CRuby occasionally pushes this special local
+ # variable when there are splat arguments. We get rid of that here.
+ names = names.grep_v(:"#arg_rest")
+
# Now push them onto the list of locals.
locals << names
end