diff options
-rw-r--r-- | variable.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -389,7 +389,7 @@ VALUE rb_path_to_class(VALUE pathname) { rb_encoding *enc = rb_enc_get(pathname); - const char *pbeg, *p, *path = RSTRING_PTR(pathname); ID id; VALUE c = rb_cObject; @@ -397,15 +397,16 @@ rb_path_to_class(VALUE pathname) rb_raise(rb_eArgError, "invalid class path encoding (non ASCII)"); } pbeg = p = path; - if (path[0] == '#') { rb_raise(rb_eArgError, "can't retrieve anonymous class %"PRIsVALUE, QUOTE(pathname)); } - while (*p) { - while (*p && *p != ':') p++; id = rb_check_id_cstr(pbeg, p-pbeg, enc); - if (p[0] == ':') { - if (p[1] != ':') goto undefined_class; p += 2; pbeg = p; } |