зеркало из https://github.com/github/ruby.git
On LLP64 platform (mswin64), the return value of String#hash is fixnum.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
1f136bffe6
Коммит
0558ba4e7b
|
@ -362,10 +362,8 @@ VALUE string_spec_StringValue(VALUE self, VALUE str) {
|
|||
static VALUE string_spec_rb_str_hash(VALUE self, VALUE str) {
|
||||
st_index_t val = rb_str_hash(str);
|
||||
|
||||
#if SIZEOF_LONG == SIZEOF_VOIDP
|
||||
#if SIZEOF_LONG == SIZEOF_VOIDP || SIZEOF_LONG_LONG == SIZEOF_VOIDP
|
||||
return LONG2FIX((long)val);
|
||||
#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
|
||||
return LL2NUM((LONG_LONG)val);
|
||||
#else
|
||||
# error unsupported platform
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче