summaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-18 08:43:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-18 08:43:30 +0000
commitd9ddf552768351b3c4d794d25348d2cac90a2e5c (patch)
tree822b14f88ebda235fae7a25cc3eda965abfbad3a /string.c
parentc3c29381b8c90a4cc27e08f1e8a337a95037c90f (diff)
downloadruby-d9ddf552768351b3c4d794d25348d2cac90a2e5c.tar.gz
ruby-d9ddf552768351b3c4d794d25348d2cac90a2e5c.tar.xz
ruby-d9ddf552768351b3c4d794d25348d2cac90a2e5c.zip
* string.c (rb_str_hash_cmp): got rid of overflow.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 493ef5d87..34f35b8b2 100644
--- a/string.c
+++ b/string.c
@@ -2239,7 +2239,7 @@ rb_str_hash(VALUE str)
int
rb_str_hash_cmp(VALUE str1, VALUE str2)
{
- int len;
+ long len;
if (!rb_str_comparable(str1, str2)) return 1;
if (RSTRING_LEN(str1) == (len = RSTRING_LEN(str2)) &&