aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-15 01:57:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-15 01:57:28 +0000
commit4e2d5e645af563b3a2fbaea7ecdb2cb1150cc834 (patch)
tree5c8e1ef5ecb2b18d112ae5992f59470b0a2e116e /vm_insnhelper.c
parent1e30933a132ad22f5d0aaaedf5b0d0e57216eae8 (diff)
downloadruby-4e2d5e645af563b3a2fbaea7ecdb2cb1150cc834.tar.gz
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.c2
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;