summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-12 10:23:53 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-12 10:23:53 +0000
commit0558ba4e7b7b51a766cd675df542f2d0d9265e30 (patch)
tree461834568c59e65816578a3e25ab2fc03d4e481d /spec
parent1f136bffe6de68fd231a060d275223fb45f4d28a (diff)
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
Diffstat (limited to 'spec')
-rw-r--r--spec/rubyspec/optional/capi/ext/string_spec.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/spec/rubyspec/optional/capi/ext/string_spec.c b/spec/rubyspec/optional/capi/ext/string_spec.c
index 8d579f918f..69e66fbde1 100644
--- a/spec/rubyspec/optional/capi/ext/string_spec.c
+++ b/spec/rubyspec/optional/capi/ext/string_spec.c
@@ -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