mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* intern.h, object.c, variable.c (rb_mod_constants): added an optional
flag to search ancestors, which is defaulted to true, as well as const_defined? and const_get. [ruby-dev:29989] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8d69c7f116
commit
f4aca06c84
5 changed files with 40 additions and 10 deletions
2
object.c
2
object.c
|
@ -2406,7 +2406,7 @@ Init_Object(void)
|
|||
rb_define_method(rb_cModule, "local_methods",
|
||||
rb_class_local_methods, 0); /* in class.c */
|
||||
|
||||
rb_define_method(rb_cModule, "constants", rb_mod_constants, 0); /* in variable.c */
|
||||
rb_define_method(rb_cModule, "constants", rb_mod_constants, -1); /* in variable.c */
|
||||
rb_define_method(rb_cModule, "const_get", rb_mod_const_get, -1);
|
||||
rb_define_method(rb_cModule, "const_set", rb_mod_const_set, 2);
|
||||
rb_define_method(rb_cModule, "const_defined?", rb_mod_const_defined, -1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue