diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-12 09:43:05 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-12 09:43:05 +0000 |
commit | ee160e68f9fbb518d4f514987a329fc0a2332973 (patch) | |
tree | 289b86fc2f871f170569ee9c6b4c3083d4c27005 /class.c | |
parent | 2c0d3e2a2e134a345a83ccd9a9e70af77ac4963f (diff) | |
download | ruby-ee160e68f9fbb518d4f514987a329fc0a2332973.tar.gz |
class.c: no fstring singleton class
* class.c (singleton_class_of): prohibit fstrings from creating
singleton classes.
temporary measure for [ruby-dev:49867] [Bug #12923]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r-- | class.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; } } |