summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-29 12:38:43 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-29 12:38:43 (GMT)
commitede1c141c62015eb413655310f046906775b375b (patch)
tree136d3edd527362e59850bb3f5ba5704741030bfa /hash.c
parent184cf1f710d42446d75a862f63c01bb2d401e562 (diff)
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 07d88a7..4d5b4c6 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: