summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/string.c b/string.c
index 57b4e9ac15..56f1432bde 100644
--- a/string.c
+++ b/string.c
@@ -2963,13 +2963,7 @@ static VALUE
rb_str_hash_m(VALUE str)
{
st_index_t hval = rb_str_hash(str);
-#if SIZEOF_LONG == SIZEOF_VOIDP
- return LONG2FIX((long)hval);
-#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
- return LL2NUM((LONG_LONG)hval);
-#else
-# error unsupported platform
-#endif
+ return ST2FIX(hval);
}
#define lesser(a,b) (((a)>(b))?(b):(a))