Actions
Feature #5029
closedaccept multiple args in Kernel#warn(), like puts()
Status:
Closed
Assignee:
-
Target version:
-
Description
Hello,
Please make Kernel#warn() like Kernel#puts():
- Accept multiple arguments.
- Print them separated by newline.
This will allow me to warn exceptions easily:
begin
...
rescue => error
warn error.inspect, error.backtrace
end
Instead of the current way, of having to write:
begin
...
rescue => error
warn error.inspect
warn error.backtrace.join("\n")
end
Thanks for your consideration.
Files
Updated by boredomist (Erik Price) almost 13 years ago
- File 0001-Changed-rb_warn_m-to-accept-variable-arguments.patch 0001-Changed-rb_warn_m-to-accept-variable-arguments.patch added
I implemented this feature request in the attached patch if there's any interest in the changed behavior of Kernel#warn().
Updated by nobu (Nobuyoshi Nakada) almost 13 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r32568.
Suraj, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- error.c (rb_warn_m): accept multiple args in like puts. rdoc
patch by Erik Price at [ruby-core:38119]. [Feature #5029]
Actions
Like0
Like0Like0