aboutsummaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorDylan Thacker-Smith <Dylan.Smith@shopify.com>2019-11-06 01:47:32 -0500
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-13 15:36:58 +0900
commitac112f2b5dc7e16ccde8f048be80946187a033b0 (patch)
tree5ad84ea663becd04e7a77fd6f6cf5f4ea3678a86 /tool
parenta5b6d7bca84fce6e13c68e8753893c4697960e3a (diff)
downloadruby-ac112f2b5dc7e16ccde8f048be80946187a033b0.tar.gz
Avoid top-level search for nested constant reference from nil in defined?
Fixes [Bug #16332] Constant access was changed to no longer allow top-level constant access through `nil`, but `defined?` wasn't changed at the same time to stay consistent. Use a separate defined type to distinguish between a constant referenced from the current lexical scope and one referenced from another namespace.
Diffstat (limited to 'tool')
-rw-r--r--tool/ruby_vm/views/_leaf_helpers.erb1
1 files changed, 1 insertions, 0 deletions
diff --git a/tool/ruby_vm/views/_leaf_helpers.erb b/tool/ruby_vm/views/_leaf_helpers.erb
index 12defa5bf6..ac60f2dcbc 100644
--- a/tool/ruby_vm/views/_leaf_helpers.erb
+++ b/tool/ruby_vm/views/_leaf_helpers.erb
@@ -81,6 +81,7 @@ leafness_of_defined(rb_num_t op_type)
case DEFINED_ZSUPER:
return false;
case DEFINED_CONST:
+ case DEFINED_CONST_FROM:
/* has rb_autoload_load(); */
return false;
case DEFINED_FUNC: