diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/pathname/pathname.c | 6 |
2 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Fri Nov 4 10:51:16 2016 Nobuyoshi Nakada <[email protected]> + + * ext/pathname/pathname.c (path_hash): fix unnormalized Fixnum + value bug on mingw/mswin. + Fri Nov 4 10:35:47 2016 Nobuyoshi Nakada <[email protected]> * lib/fileutils.rb (FileUtils::Entry_#copy): ensure that the diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c index 4fe8859353..5987ccf462 100644 --- a/ext/pathname/pathname.c +++ b/ext/pathname/pathname.c @@ -155,11 +155,15 @@ path_cmp(VALUE self, VALUE other) return INT2FIX(0); } +#ifndef ST2FIX +#define ST2FIX(h) LONG2FIX((long)(h)) +#endif + /* :nodoc: */ static VALUE path_hash(VALUE self) { - return INT2FIX(rb_str_hash(get_strpath(self))); + return ST2FIX(rb_str_hash(get_strpath(self))); } /* |