summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/string.c b/string.c
index dc1df0671d..1a9fd3bca1 100644
--- a/string.c
+++ b/string.c
@@ -5032,8 +5032,7 @@ get_pat_quoted(VALUE pat, int check)
{
VALUE val;
- if (SPECIAL_CONST_P(pat)) goto to_string;
- switch (BUILTIN_TYPE(pat)) {
+ switch (OBJ_BUILTIN_TYPE(pat)) {
case T_REGEXP:
return pat;
@@ -5041,7 +5040,6 @@ get_pat_quoted(VALUE pat, int check)
break;
default:
- to_string:
val = rb_check_string_type(pat);
if (NIL_P(val)) {
Check_Type(pat, T_REGEXP);