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:
usa 2017-05-12 10:23:53 +00:00
Родитель 1f136bffe6
Коммит 0558ba4e7b
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -362,10 +362,8 @@ VALUE string_spec_StringValue(VALUE self, VALUE str) {
static VALUE string_spec_rb_str_hash(VALUE self, VALUE str) { static VALUE string_spec_rb_str_hash(VALUE self, VALUE str) {
st_index_t val = rb_str_hash(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); return LONG2FIX((long)val);
#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
return LL2NUM((LONG_LONG)val);
#else #else
# error unsupported platform # error unsupported platform
#endif #endif