Skip to content

Commit b39c951

Browse files
committed
Fix FrozenError 🐛 on authentication errors
This fixes the following error: FrozenError: can't modify frozen String Now that we've added frozen string literal comments we need to be aware of string mutations. It appears this is the only mutation we make.
1 parent 9bdef95 commit b39c951

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/kracken/json_api/public_exceptions.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ def log_error(env, wrapper)
1515
trace = wrapper.framework_trace if trace.empty?
1616

1717
ActiveSupport::Deprecation.silence do
18-
message = "\n#{exception.class} (#{exception.message}):\n"
18+
# After Ruby 2.2.3 support change `String.new` to `+` literal
19+
message = String.new("\n#{exception.class} (#{exception.message}):\n")
1920
message << exception.annoted_source_code.to_s if exception.respond_to?(:annoted_source_code)
2021
message << " " << trace.join("\n ")
2122
logger.fatal("#{message}\n\n")

0 commit comments

Comments
 (0)