diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-15 01:57:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-15 01:57:28 +0000 |
commit | 5cb5692ac8758420ddb7b5bdae337f2338d91b26 (patch) | |
tree | 5c8e1ef5ecb2b18d112ae5992f59470b0a2e116e /vm_insnhelper.c | |
parent | 6d4fb98e59e74bb23329314482ef8012bf90aa92 (diff) |
vm_insnhelper.c: deprecated constant in class
* vm_insnhelper.c (vm_get_ev_const): warn deprecated constant even
in the class context. [ruby-core:75505] [Bug #12382]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index dc43d88b6a..403b24bdfe 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -664,6 +664,7 @@ vm_get_iclass(rb_control_frame_t *cfp, VALUE klass) static inline VALUE vm_get_ev_const(rb_thread_t *th, VALUE orig_klass, ID id, int is_defined) { + void rb_const_warn_if_deprecated(const rb_const_entry_t *ce, VALUE klass, ID id); VALUE val; if (orig_klass == Qnil) { @@ -690,6 +691,7 @@ vm_get_ev_const(rb_thread_t *th, VALUE orig_klass, ID id, int is_defined) rb_const_entry_t *ce; search_continue: if ((ce = rb_const_lookup(klass, id))) { + rb_const_warn_if_deprecated(ce, klass, id); val = ce->value; if (val == Qundef) { if (am == klass) break; |