[前][次][番号順一覧][スレッド一覧]

ruby-changes:15397

From: naruse <ko1@a...>
Date: Sun, 11 Apr 2010 09:01:03 +0900 (JST)
Subject: [ruby-changes:15397] Ruby:r27290 (trunk): * lib/rdoc/rdoc.rb (setup_output_dir): compare by Time#to_i.

naruse	2010-04-11 09:00:43 +0900 (Sun, 11 Apr 2010)

  New Revision: 27290

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27290

  Log:
    * lib/rdoc/rdoc.rb (setup_output_dir): compare by Time#to_i.
      Cached created time doesn't have fractinal times,
      but FileStat#mtime has; so rdoc almost alway judged files
      are updated.

  Modified files:
    trunk/ChangeLog
    trunk/lib/rdoc/rdoc.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27289)
+++ ChangeLog	(revision 27290)
@@ -1,6 +1,13 @@
+Sun Apr 11 08:56:44 2010  NARUSE, Yui  <naruse@r...>
+
+	* lib/rdoc/rdoc.rb (setup_output_dir): compare by Time#to_i.
+	  Cached created time doesn't have fractinal times,
+	  but FileStat#mtime has; so rdoc almost alway judged files
+	  are updated.
+
 Sun Apr 11 07:40:48 2010  NARUSE, Yui  <naruse@r...>
 
-	* lib/rdoc/rdoc.rb (setup_output_dir): fix typo.
+	* lib/rdoc/rdoc.rb (setup_output_dir): fix typo. [ruby-core:29415]
 
 Sun Apr 11 07:01:41 2010  NARUSE, Yui  <naruse@r...>
 
Index: lib/rdoc/rdoc.rb
===================================================================
--- lib/rdoc/rdoc.rb	(revision 27289)
+++ lib/rdoc/rdoc.rb	(revision 27290)
@@ -227,7 +227,7 @@
       case type = stat.ftype
       when "file" then
         next if last_created = @last_created[rel_file_name] and
-                stat.mtime <= last_created
+                stat.mtime.to_i <= last_created.to_i
 
         if force_doc or RDoc::Parser.can_parse(rel_file_name) then
           file_list << rel_file_name.sub(/^\.\//, '')

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]