We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5914dd commit 5851706Copy full SHA for 5851706
variable.c
@@ -318,10 +318,11 @@ rb_class_path_no_cache(VALUE klass)
318
VALUE
319
rb_class_path_cached(VALUE klass)
320
{
321
- st_table *ivtbl = RCLASS_IV_TBL(klass);
+ st_table *ivtbl;
322
st_data_t n;
323
324
- if (!ivtbl) return Qnil;
+ if (!RCLASS_EXT(klass)) return Qnil;
325
+ if (!(ivtbl = RCLASS_IV_TBL(klass))) return Qnil;
326
if (st_lookup(ivtbl, (st_data_t)classpath, &n)) return (VALUE)n;
327
if (st_lookup(ivtbl, (st_data_t)tmp_classpath, &n)) return (VALUE)n;
328
return Qnil;
0 commit comments