summaryrefslogtreecommitdiffstats
path: root/intern.h
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-17 08:40:52 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-17 08:40:52 +0000
commitde107086de30354decab4d434064679e325e18dd (patch)
tree3603c905bbb81de90e8de49e1b476c96137a7370 /intern.h
parent35bd64b5d517faf8e4e0f40f214312e6bfbaede6 (diff)
downloadruby-de107086de30354decab4d434064679e325e18dd.tar.gz
ruby-de107086de30354decab4d434064679e325e18dd.tar.xz
ruby-de107086de30354decab4d434064679e325e18dd.zip
* eval.c (ev_const_get): simplified using rb_const_get_fallback().
* eval.c (ev_const_defined): adopt to ev_const_get() using rb_const_defined_fallback(). * variable.c (rb_const_get_fallback): new function to implement constant search. * variable.c (rb_const_defined_fallback): new function to implement constant definition check. * variable.c (rb_const_get_0): adopt to new behavior. constants are looked up in the order of: current class, super classes (but Object), lexically external classes/modules, and Object. * variable.c (rb_const_defined_0): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'intern.h')
-rw-r--r--intern.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/intern.h b/intern.h
index 421204225..761eae57c 100644
--- a/intern.h
+++ b/intern.h
@@ -557,9 +557,11 @@ VALUE rb_mod_remove_const(VALUE, VALUE);
int rb_const_defined(VALUE, ID);
int rb_const_defined_at(VALUE, ID);
int rb_const_defined_from(VALUE, ID);
+int rb_const_defined_fallback(VALUE, ID, struct RNode *);
VALUE rb_const_get(VALUE, ID);
VALUE rb_const_get_at(VALUE, ID);
VALUE rb_const_get_from(VALUE, ID);
+VALUE rb_const_get_fallback(VALUE, ID, struct RNode *);
void rb_const_set(VALUE, ID, VALUE);
VALUE rb_mod_constants(VALUE);
VALUE rb_mod_const_missing(VALUE,VALUE);