1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

error.c: NameError::message _dump

* 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
This commit is contained in:
nobu 2012-12-24 15:58:15 +00:00
parent 4d33d02778
commit d2fa4d7118

View file

@ -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)
@ -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);