mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* object.c (Init_Object): singleton_method_{added,removed,undefined}
hooks should be defined for BasicObject. [ruby-dev:32531] * eval.c (Init_eval): method_missing should be defined for all objects; moved to BasicObject. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3609358aac
commit
2db98d937a
3 changed files with 14 additions and 5 deletions
|
@ -1,3 +1,11 @@
|
|||
Tue Dec 11 15:20:39 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* object.c (Init_Object): singleton_method_{added,removed,undefined}
|
||||
hooks should be defined for BasicObject. [ruby-dev:32531]
|
||||
|
||||
* eval.c (Init_eval): method_missing should be defined for all
|
||||
objects; moved to BasicObject.
|
||||
|
||||
Tue Dec 11 14:27:50 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* transcode.c (transcode_loop): get rid of SEGV at sequence can not be
|
||||
|
|
3
eval.c
3
eval.c
|
@ -2731,10 +2731,11 @@ Init_eval(void)
|
|||
rb_define_virtual_variable("$@", errat_getter, errat_setter);
|
||||
rb_define_virtual_variable("$!", errinfo_getter, 0);
|
||||
|
||||
rb_define_private_method(rb_cBasicObject, "method_missing", rb_method_missing, -1);
|
||||
|
||||
rb_define_global_function("eval", rb_f_eval, -1);
|
||||
rb_define_global_function("iterator?", rb_f_block_given_p, 0);
|
||||
rb_define_global_function("block_given?", rb_f_block_given_p, 0);
|
||||
rb_define_global_function("method_missing", rb_method_missing, -1);
|
||||
rb_define_global_function("loop", rb_f_loop, 0);
|
||||
|
||||
rb_define_method(rb_mKernel, "respond_to?", obj_respond_to, -1);
|
||||
|
|
8
object.c
8
object.c
|
@ -2351,6 +2351,10 @@ Init_Object(void)
|
|||
rb_define_method(rb_cBasicObject, "!@", rb_obj_not, 0);
|
||||
rb_define_method(rb_cBasicObject, "!=", rb_obj_not_equal, 1);
|
||||
|
||||
rb_define_private_method(rb_cBasicObject, "singleton_method_added", rb_obj_dummy, 1);
|
||||
rb_define_private_method(rb_cBasicObject, "singleton_method_removed", rb_obj_dummy, 1);
|
||||
rb_define_private_method(rb_cBasicObject, "singleton_method_undefined", rb_obj_dummy, 1);
|
||||
|
||||
rb_mKernel = rb_define_module("Kernel");
|
||||
rb_include_module(rb_cObject, rb_mKernel);
|
||||
rb_define_private_method(rb_cClass, "inherited", rb_obj_dummy, 1);
|
||||
|
@ -2396,10 +2400,6 @@ Init_Object(void)
|
|||
rb_define_method(rb_mKernel, "is_a?", rb_obj_is_kind_of, 1);
|
||||
rb_define_method(rb_mKernel, "tap", rb_obj_tap, 0);
|
||||
|
||||
rb_define_private_method(rb_mKernel, "singleton_method_added", rb_obj_dummy, 1);
|
||||
rb_define_private_method(rb_mKernel, "singleton_method_removed", rb_obj_dummy, 1);
|
||||
rb_define_private_method(rb_mKernel, "singleton_method_undefined", rb_obj_dummy, 1);
|
||||
|
||||
rb_define_global_function("sprintf", rb_f_sprintf, -1); /* in sprintf.c */
|
||||
rb_define_global_function("format", rb_f_sprintf, -1); /* in sprintf.c */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue