aboutsummaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-29 12:38:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-29 12:38:43 +0000
commitede1c141c62015eb413655310f046906775b375b (patch)
tree136d3edd527362e59850bb3f5ba5704741030bfa /hash.c
parent184cf1f710d42446d75a862f63c01bb2d401e562 (diff)
downloadruby-ede1c141c62015eb413655310f046906775b375b.tar.gz
symbol.c: fix dynamic symbol hash value
* hash.c (any_hash), symbol.c (dsymbol_alloc): fix dynamic symbol hash value by restricting in Fixnum range, that is `long`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 07d88a7d66..4d5b4c63df 100644
--- a/hash.c
+++ b/hash.c
@@ -150,7 +150,7 @@ any_hash(VALUE a, st_index_t (*other_func)(VALUE))
hnum = rb_str_hash(a);
}
else if (BUILTIN_TYPE(a) == T_SYMBOL) {
- return RSYMBOL(a)->hashval;
+ hnum = RSYMBOL(a)->hashval;
}
else if (BUILTIN_TYPE(a) == T_FLOAT) {
flt: