Skip to content

Commit a1a75ea

Browse files
Do not use String#prepend, as it modifies the string.
1 parent ab16d6c commit a1a75ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/scientist/experiment.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ def to_s
4141
def format_observation(observation)
4242
observation.name + ":\n" +
4343
if observation.raised?
44-
observation.exception.inspect.prepend(" ") + "\n" +
45-
observation.exception.backtrace.map { |line| line.prepend(" ") }.join("\n")
44+
" " + observation.exception.inspect + "\n" +
45+
observation.exception.backtrace.map { |line| " " + line }.join("\n")
4646
else
47-
observation.cleaned_value.inspect.prepend(" ")
47+
" " + observation.cleaned_value.inspect
4848
end
4949
end
5050
end

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy