Skip to content

Commit

Permalink
error.c: NameError::message _dump
Browse files Browse the repository at this point in the history
* error.c (name_err_mesg_dump): adapt argument number.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Dec 24, 2012
1 parent 4d33d02 commit d2fa4d7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion error.c
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,13 @@ name_err_mesg_to_str(VALUE obj)
return mesg;
}

/* :nodoc: */
static VALUE
name_err_mesg_dump(VALUE obj, VALUE limit)
{
return name_err_mesg_to_str(obj);
}

/* :nodoc: */
static VALUE
name_err_mesg_load(VALUE klass, VALUE str)
Expand Down Expand Up @@ -1732,7 +1739,7 @@ Init_Exception(void)
rb_define_singleton_method(rb_cNameErrorMesg, "!", rb_name_err_mesg_new, NAME_ERR_MESG_COUNT);
rb_define_method(rb_cNameErrorMesg, "==", name_err_mesg_equal, 1);
rb_define_method(rb_cNameErrorMesg, "to_str", name_err_mesg_to_str, 0);
rb_define_method(rb_cNameErrorMesg, "_dump", name_err_mesg_to_str, 1);
rb_define_method(rb_cNameErrorMesg, "_dump", name_err_mesg_dump, 1);
rb_define_singleton_method(rb_cNameErrorMesg, "_load", name_err_mesg_load, 1);
rb_eNoMethodError = rb_define_class("NoMethodError", rb_eNameError);
rb_define_method(rb_eNoMethodError, "initialize", nometh_err_initialize, -1);
Expand Down

0 comments on commit d2fa4d7

Please sign in to comment.