diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-30 10:30:00 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-30 10:30:00 +0000 |
commit | 765e4e2ea68f4b219df33719009ea83677b5d85d (patch) | |
tree | d397137646a826518d6d05917b255653a67c9408 /symbol.c | |
parent | 42e5ff998bc70698131a06120f07d1e12cdabfc3 (diff) | |
download | bundler-765e4e2ea68f4b219df33719009ea83677b5d85d.tar.gz |
symbol.c (rb_sym2id): do not return garbage object
The dynamic sym passed to rb_sym2id may be a garbage object
(as accounted for by dsymbol_check). This fixes an occasional
segfault in "make test-all" for me.
No need to backport, this is from the new symbol GC feature.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'symbol.c')
-rw-r--r-- | symbol.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -759,7 +759,7 @@ rb_sym2id(VALUE sym) } else { if (!SYMBOL_PINNED_P(sym)) { - dsymbol_pindown(sym); + return dsymbol_pindown(sym); } return (ID)sym; } |