mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Avoid printing double contents from to_s
This commit is contained in:
parent
1093571fbd
commit
12eb2e9357
1 changed files with 6 additions and 0 deletions
|
@ -95,6 +95,12 @@ module Spectator
|
|||
false
|
||||
end
|
||||
|
||||
# Simplified string representation of a double.
|
||||
# Avoids displaying nested content and bloating method instantiation.
|
||||
def to_s(io : IO) : Nil
|
||||
io << _spectator_stubbed_name
|
||||
end
|
||||
|
||||
# Defines a stub to change the behavior of a method in this double.
|
||||
#
|
||||
# NOTE: Defining a stub for a method not defined in the double's type has no effect.
|
||||
|
|
Loading…
Reference in a new issue