diff options
-rw-r--r-- | object.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -2676,8 +2676,7 @@ rb_mod_const_defined(int argc, VALUE *argv, VALUE mod) pend = path + RSTRING_LEN(name); if (p >= pend || !*p) { - wrong_name: - rb_name_err_raise(wrong_constant_name, mod, name); + goto wrong_name; } if (p + 2 < pend && p[0] == ':' && p[1] == ':') { @@ -2750,6 +2749,9 @@ rb_mod_const_defined(int argc, VALUE *argv, VALUE mod) } return Qtrue; + + wrong_name: + rb_name_err_raise(wrong_constant_name, mod, name); } /* |