summaryrefslogtreecommitdiff
path: root/symbol.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-08 20:51:57 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-08 20:51:57 (GMT)
commitec177aa5908e21c041db507da35a6a78f81e1e86 (patch)
tree84751c4f6faddb48fb1785396e5c40abf21a5608 /symbol.c
parentf7085f6b9e587880d63b3609d3c9f662ad02ee7e (diff)
symbol.c (rb_intern_cstr_without_pindown): check dsymbol on return
This is not a complete fix for bug 10206, but seems to reduce that crash and also looks correct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'symbol.c')
-rw-r--r--symbol.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/symbol.c b/symbol.c
index 630a386..9cb2fe4 100644
--- a/symbol.c
+++ b/symbol.c
@@ -525,6 +525,9 @@ rb_intern_cstr_without_pindown(const char *name, long len, rb_encoding *enc)
OBJ_FREEZE(str);
if (st_lookup(global_symbols.str_id, str, &id)) {
+ if (ID_DYNAMIC_SYM_P((ID)id)) {
+ return (ID)dsymbol_check((VALUE)id);
+ }
return (ID)id;
}