1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

pathname.c: unnormalized Fixnum value

* ext/pathname/pathname.c (path_hash): fix unnormalized Fixnum
  value bug on mingw/mswin.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-11-04 01:51:18 +00:00
parent 61982b1537
commit e4257036ec
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Fri Nov 4 10:51:16 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/pathname/pathname.c (path_hash): fix unnormalized Fixnum
value bug on mingw/mswin.
Fri Nov 4 10:35:47 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/fileutils.rb (FileUtils::Entry_#copy): ensure that the

View file

@ -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)));
}
/*