mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Hide splat label in certain situations
Undefined double methods were reporting splat arguments, which is technically correct. But for output in these cases, it makes more sense to show the exact calling args.
This commit is contained in:
parent
8959d28b38
commit
c77da67341
2 changed files with 11 additions and 3 deletions
|
@ -107,14 +107,14 @@ module Spectator
|
|||
# Add the splat arguments.
|
||||
if (splat = @splat) && !splat.empty?
|
||||
io << ", " unless args.empty?
|
||||
if name = @splat_name
|
||||
io << '*' << name << ": {"
|
||||
if splat_name = !args.empty? && @splat_name
|
||||
io << '*' << splat_name << ": {"
|
||||
end
|
||||
splat.each_with_index do |arg, i|
|
||||
io << ", " if i > 0
|
||||
arg.inspect(io)
|
||||
end
|
||||
io << '}' if @splat_name
|
||||
io << '}' if splat_name
|
||||
end
|
||||
|
||||
# Add the keyword arguments.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue