1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
normal 2014-09-08 20:51:57 +00:00
parent f7085f6b9e
commit ec177aa590
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Tue Sep 9 05:48:42 2014 Eric Wong <e@80x24.org>
* 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.
Tue Sep 9 04:36:24 2014 Eric Wong <e@80x24.org>
* vm_core.h (rb_env_t): use flexible array

View file

@ -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;
}