summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-15 15:40:10 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-15 15:40:10 +0000
commit13f618f1ed08ebe182c3bf2e4948fd3be2a2be3d (patch)
tree4e9d7b92591cd0a37d795ec8b7b60c24a5786767 /vm_insnhelper.c
parentac9d6faafea77f24ce0de1d6c10c122cf6adb45a (diff)
merge revision(s) 55005: [Backport #12382]
* 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/branches/ruby_2_3@55425 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 29bf2faab9..2f34530d04 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -660,6 +660,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) {
@@ -686,6 +687,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;