ruby-changes:40107
From: usa <ko1@a...>
Date: Mon, 19 Oct 2015 01:29:19 +0900 (JST)
Subject: [ruby-changes:40107] usa:r52188 (trunk): * file.c (rb_file_identical_p): not necessary to compare the paths after
usa 2015-10-19 01:29:07 +0900 (Mon, 19 Oct 2015) New Revision: 52188 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52188 Log: * file.c (rb_file_identical_p): not necessary to compare the paths after comparing the file indexes on Windows. designate by kosaki. Modified files: trunk/ChangeLog trunk/file.c Index: ChangeLog =================================================================== --- ChangeLog (revision 52187) +++ ChangeLog (revision 52188) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Oct 19 01:26:26 2015 NAKAMURA Usaku <usa@r...> + + * file.c (rb_file_identical_p): not necessary to compare the paths after + comparing the file indexes on Windows. designate by kosaki. + Sun Oct 18 21:17:27 2015 Tanaka Akira <akr@f...> * lib/open-uri.rb: Specify frozen_string_literal: true. Index: file.c =================================================================== --- file.c (revision 52187) +++ file.c (revision 52188) @@ -1939,6 +1939,7 @@ rb_file_identical_p(VALUE obj, VALUE fna https://github.com/ruby/ruby/blob/trunk/file.c#L1939 if (rb_stat(fname2, &st2) < 0) return Qfalse; if (st1.st_dev != st2.st_dev) return Qfalse; if (st1.st_ino != st2.st_ino) return Qfalse; + return Qtrue; #else BY_HANDLE_FILE_INFORMATION st1, st2; HANDLE f1 = 0, f2 = 0; @@ -1961,14 +1962,8 @@ rb_file_identical_p(VALUE obj, VALUE fna https://github.com/ruby/ruby/blob/trunk/file.c#L1962 st1.nFileIndexHigh == st2.nFileIndexHigh && st1.nFileIndexLow == st2.nFileIndexLow) return Qtrue; - if (!f1 || !f2) return Qfalse; - fname1 = rb_file_expand_path(fname1, Qnil); - fname2 = rb_file_expand_path(fname2, Qnil); - if (RSTRING_LEN(fname1) != RSTRING_LEN(fname2)) return Qfalse; - if (rb_memcicmp(RSTRING_PTR(fname1), RSTRING_PTR(fname2), RSTRING_LEN(fname1))) - return Qfalse; + return Qfalse; #endif - return Qtrue; } /* -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/