aboutsummaryrefslogtreecommitdiffstats
path: root/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'class.c')
-rw-r--r--class.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/class.c b/class.c
index aed3ee42f2..350e2cc31b 100644
--- a/class.c
+++ b/class.c
@@ -1602,6 +1602,9 @@ singleton_class_of(VALUE obj)
switch (BUILTIN_TYPE(obj)) {
case T_FLOAT: case T_BIGNUM: case T_SYMBOL:
goto no_singleton;
+ case T_STRING:
+ if (FL_TEST_RAW(obj, RSTRING_FSTR)) goto no_singleton;
+ break;
}
}