Fix Arguments to_s

This commit is contained in:
Michael Miller 2022-10-23 15:27:39 -06:00
parent e38e3ecc32
commit 163f94287e
No known key found for this signature in database
GPG key ID: 32B47AE8F388A1FF
2 changed files with 4 additions and 5 deletions

View file

@ -92,16 +92,15 @@ module Spectator
# Add the splat arguments.
if (extra = @extra) && !extra.empty?
if splat = @splat_name
io << splat << ": {"
end
io << ", " unless positional.empty?
if splat = @splat_name
io << '*' << splat << ": {"
end
extra.each_with_index do |arg, i|
io << ", " if i > 0
arg.inspect(io)
end
io << '}' if @splat_name
io << ", " unless kwargs.empty?
end
# Add the keyword arguments.