summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-26 07:32:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-26 07:32:03 +0000
commit836724583916b503e1b84dbd96903daeee6ef2ab (patch)
tree5db69f7ea179ca9cf1f7f21960637ebdd22441b6 /string.c
parentf23486592ab9dd3b29dcf6f4f924cd7306e4fc65 (diff)
* string.c (rb_hash_start): fixed shift width on 128bit platform.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/string.c b/string.c
index ef826d8594..8d06843dce 100644
--- a/string.c
+++ b/string.c
@@ -2206,15 +2206,15 @@ rb_hash_start(st_index_t h)
if (!hashseed_init) {
hashseed = rb_genrand_int32();
#if SIZEOF_VALUE*CHAR_BIT > 4*8
- hashseed <<= 4*8;
+ hashseed <<= 32;
hashseed |= rb_genrand_int32();
#endif
#if SIZEOF_VALUE*CHAR_BIT > 8*8
- hashseed <<= 8*8;
+ hashseed <<= 32;
hashseed |= rb_genrand_int32();
#endif
#if SIZEOF_VALUE*CHAR_BIT > 12*8
- hashseed <<= 12*8;
+ hashseed <<= 32;
hashseed |= rb_genrand_int32();
#endif
hashseed_init = 1;