Update comments regarding Exception#to_str

parent 1bb6964d
...@@ -62,7 +62,7 @@ exc_initialize(mrb_state *mrb, mrb_value exc) ...@@ -62,7 +62,7 @@ exc_initialize(mrb_state *mrb, mrb_value exc)
* With no argument, or if the argument is the same as the receiver, * With no argument, or if the argument is the same as the receiver,
* return the receiver. Otherwise, create a new * return the receiver. Otherwise, create a new
* exception object of the same class as the receiver, but with a * exception object of the same class as the receiver, but with a
* message equal to <code>string.to_str</code>. * message equal to <code>string</code>.
* *
*/ */
...@@ -111,9 +111,7 @@ exc_to_s(mrb_state *mrb, mrb_value exc) ...@@ -111,9 +111,7 @@ exc_to_s(mrb_state *mrb, mrb_value exc)
* exception.message -> string * exception.message -> string
* *
* Returns the result of invoking <code>exception.to_s</code>. * Returns the result of invoking <code>exception.to_s</code>.
* Normally this returns the exception's message or name. By * Normally this returns the exception's message or name.
* supplying a to_str method, exceptions are agreeing to
* be used where Strings are expected.
*/ */
static mrb_value static mrb_value
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment