Skip to content

Commit 8d9149c

Browse files
committed
more Rubo👮❤️
1 parent c270877 commit 8d9149c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

sentry-ruby/lib/sentry/utils/logging_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def sdk_logger
3434

3535
# @!visibility private
3636
def log_to_stderr(error, message)
37-
$stderr.puts("Sentry SDK logging failed (#{error.class}: #{error.message}): #{message}".scrub(%q{<?>}))
37+
$stderr.puts("Sentry SDK logging failed (#{error.class}: #{error.message}): #{message}".scrub(%q(<?>)))
3838
end
3939
end
4040
end

sentry-ruby/spec/sentry/utils/logging_helper_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ def initialize(*)
8585

8686
it "scrubs invalid UTF-8 in stderr output when JSON logger fails on encoding" do
8787
helper = helper_class.new(json_logger)
88-
88+
8989
invalid_message = "a\x92b"
9090
exception = StandardError.new("oops")
91-
91+
9292
stderr_message = nil
9393
expect($stderr).to receive(:puts) { |msg| stderr_message = msg }
94-
94+
9595
expect { helper.log_error(invalid_message, exception) }.not_to raise_error
96-
96+
9797
expect(stderr_message).to include("JSON::GeneratorError")
9898
expect(stderr_message).to include("a<?>b")
9999
expect(stderr_message).to include("oops")

0 commit comments

Comments
 (0)