object.c: no TypeError at Symbol

* object.c (special_object_p): uninterned Symbol also should not
  raise a TypeError but return itself instead, as well as interned
  Symbols.  [ruby-core:79216] [Bug #13145]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-01-23 06:16:04 +00:00
parent 5bb125c63e
commit 11e6bd5ac2
2 changed files with 5 additions and 0 deletions

View file

@ -304,6 +304,7 @@ special_object_p(VALUE obj)
switch (BUILTIN_TYPE(obj)) {
case T_BIGNUM:
case T_FLOAT:
case T_SYMBOL:
return TRUE;
default:
return FALSE;