Commit 0fe62ddc authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2183 from yui-knk/fix-error-comment

Fix comment of exc_inspect (and adjust spaces)
parents b87bfe73 cf80e7fe
...@@ -115,7 +115,10 @@ exc_message(mrb_state *mrb, mrb_value exc) ...@@ -115,7 +115,10 @@ exc_message(mrb_state *mrb, mrb_value exc)
* call-seq: * call-seq:
* exception.inspect -> string * exception.inspect -> string
* *
* Return this exception's class name an message * Returns this exception's file name, line number,
* message and class name.
* If file name or line number is not set,
* returns message and class name.
*/ */
static mrb_value static mrb_value
...@@ -444,18 +447,18 @@ mrb_init_exception(mrb_state *mrb) ...@@ -444,18 +447,18 @@ mrb_init_exception(mrb_state *mrb)
{ {
struct RClass *e; struct RClass *e;
mrb->eException_class = e = mrb_define_class(mrb, "Exception", mrb->object_class); /* 15.2.22 */ mrb->eException_class = e = mrb_define_class(mrb, "Exception", mrb->object_class); /* 15.2.22 */
mrb_define_class_method(mrb, e, "exception", mrb_instance_new, MRB_ARGS_ANY()); mrb_define_class_method(mrb, e, "exception", mrb_instance_new, MRB_ARGS_ANY());
mrb_define_method(mrb, e, "exception", exc_exception, MRB_ARGS_ANY()); mrb_define_method(mrb, e, "exception", exc_exception, MRB_ARGS_ANY());
mrb_define_method(mrb, e, "initialize", exc_initialize, MRB_ARGS_ANY()); mrb_define_method(mrb, e, "initialize", exc_initialize, MRB_ARGS_ANY());
mrb_define_method(mrb, e, "==", exc_equal, MRB_ARGS_REQ(1)); mrb_define_method(mrb, e, "==", exc_equal, MRB_ARGS_REQ(1));
mrb_define_method(mrb, e, "to_s", exc_to_s, MRB_ARGS_NONE()); mrb_define_method(mrb, e, "to_s", exc_to_s, MRB_ARGS_NONE());
mrb_define_method(mrb, e, "message", exc_message, MRB_ARGS_NONE()); mrb_define_method(mrb, e, "message", exc_message, MRB_ARGS_NONE());
mrb_define_method(mrb, e, "inspect", exc_inspect, MRB_ARGS_NONE()); mrb_define_method(mrb, e, "inspect", exc_inspect, MRB_ARGS_NONE());
mrb_define_method(mrb, e, "backtrace", mrb_exc_backtrace, MRB_ARGS_NONE()); mrb_define_method(mrb, e, "backtrace", mrb_exc_backtrace, MRB_ARGS_NONE());
mrb->eStandardError_class = mrb_define_class(mrb, "StandardError", mrb->eException_class); /* 15.2.23 */ mrb->eStandardError_class = mrb_define_class(mrb, "StandardError", mrb->eException_class); /* 15.2.23 */
mrb_define_class(mrb, "RuntimeError", mrb->eStandardError_class); /* 15.2.28 */ mrb_define_class(mrb, "RuntimeError", mrb->eStandardError_class); /* 15.2.28 */
e = mrb_define_class(mrb, "ScriptError", mrb->eException_class); /* 15.2.37 */ e = mrb_define_class(mrb, "ScriptError", mrb->eException_class); /* 15.2.37 */
mrb_define_class(mrb, "SyntaxError", e); /* 15.2.38 */ mrb_define_class(mrb, "SyntaxError", e); /* 15.2.38 */
} }
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