1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* string.c (rb_str_hash_cmp): got rid of overflow.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-07-18 08:43:30 +00:00
parent e07cb859cc
commit 33151fcfe4
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Sat Jul 18 17:43:12 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* string.c (rb_str_hash_cmp): got rid of overflow.
Sat Jul 18 16:03:01 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* include/ruby/defines.h (TRUE, FALSE): for internal use.

View file

@ -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)) &&