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

ruby-changes:8754

From: matz <ko1@a...>
Date: Thu, 20 Nov 2008 07:35:55 +0900 (JST)
Subject: [ruby-changes:8754] Ruby:r20290 (trunk): * lib/logger.rb (Logger): should handle the case that cvs/svn do

matz	2008-11-20 07:35:40 +0900 (Thu, 20 Nov 2008)

  New Revision: 20290

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

  Log:
    * lib/logger.rb (Logger): should handle the case that cvs/svn do
      not expand $Id keyword.  [ruby-core:19991]

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

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 20289)
+++ ChangeLog	(revision 20290)
@@ -1,3 +1,8 @@
+Thu Nov 20 07:33:15 2008  Yukihiro Matsumoto  <matz@r...>
+
+	* lib/logger.rb (Logger): should handle the case that cvs/svn do
+	  not expand $Id keyword.  [ruby-core:19991]
+
 Thu Nov 20 07:27:36 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* lib/minitest/unit.rb (MiniTest::Assertions#capture_io): adjust
Index: lib/logger.rb
===================================================================
--- lib/logger.rb	(revision 20289)
+++ lib/logger.rb	(revision 20290)
@@ -182,7 +182,13 @@
 class Logger
   VERSION = "1.2.6"
   id, name, rev = %w$Id$
-  ProgName = "#{name.chomp(",v")}/#{rev}"
+  if name
+    name = name.chomp(",v")
+  else
+    name = File.basename(__FILE__)
+  end
+  rev ||= "v#{VERSION}"
+  ProgName = "#{name}/#{rev}"
 
   class Error < RuntimeError; end
   class ShiftingError < Error; end

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

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