mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/logger] Avoid creating [] and "" when logging an Exception that has no backtrace
https://github.com/ruby/logger/commit/75fd308053
This commit is contained in:
parent
0aafc32995
commit
6158e28f8d
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ class Logger
|
|||
when ::String
|
||||
msg
|
||||
when ::Exception
|
||||
"#{ msg.message } (#{ msg.class })\n#{ (msg.backtrace || []).join("\n") }"
|
||||
"#{ msg.message } (#{ msg.class })\n#{ msg.backtrace.join("\n") if msg.backtrace }"
|
||||
else
|
||||
msg.inspect
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue