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

[DOC] Fixed the class name in FrozenError#receiver

This commit is contained in:
Nobuyoshi Nakada 2019-12-15 00:21:19 +09:00
parent 38b9d213f1
commit db2ea9b0c5
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

11
error.c
View file

@ -1435,6 +1435,15 @@ frozen_err_initialize(int argc, VALUE *argv, VALUE self)
return self; return self;
} }
/*
* call-seq:
* frozen_error.receiver -> object
*
* Return the receiver associated with this FrozenError exception.
*/
#define frozen_err_receiver name_err_receiver
void void
rb_name_error(ID id, const char *fmt, ...) rb_name_error(ID id, const char *fmt, ...)
{ {
@ -2529,7 +2538,7 @@ Init_Exception(void)
rb_eRuntimeError = rb_define_class("RuntimeError", rb_eStandardError); rb_eRuntimeError = rb_define_class("RuntimeError", rb_eStandardError);
rb_eFrozenError = rb_define_class("FrozenError", rb_eRuntimeError); rb_eFrozenError = rb_define_class("FrozenError", rb_eRuntimeError);
rb_define_method(rb_eFrozenError, "initialize", frozen_err_initialize, -1); rb_define_method(rb_eFrozenError, "initialize", frozen_err_initialize, -1);
rb_define_method(rb_eFrozenError, "receiver", name_err_receiver, 0); rb_define_method(rb_eFrozenError, "receiver", frozen_err_receiver, 0);
rb_eSecurityError = rb_define_class("SecurityError", rb_eException); rb_eSecurityError = rb_define_class("SecurityError", rb_eException);
rb_eNoMemError = rb_define_class("NoMemoryError", rb_eException); rb_eNoMemError = rb_define_class("NoMemoryError", rb_eException);
rb_eEncodingError = rb_define_class("EncodingError", rb_eStandardError); rb_eEncodingError = rb_define_class("EncodingError", rb_eStandardError);