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

ruby-changes:8710

From: nobu <ko1@a...>
Date: Tue, 18 Nov 2008 16:19:32 +0900 (JST)
Subject: [ruby-changes:8710] Ruby:r20245 (trunk, ruby_1_8): * lib/logger.rb (ProgName): fixed for svn, based on a patch from

nobu	2008-11-18 16:18:29 +0900 (Tue, 18 Nov 2008)

  New Revision: 20245

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

  Log:
    * lib/logger.rb (ProgName): fixed for svn, based on a patch from
      Nobuhiro IMAI at [ruby-dev:37108].

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/lib/logger.rb
    branches/ruby_1_8/test/logger/test_logger.rb
    trunk/ChangeLog
    trunk/lib/logger.rb
    trunk/test/logger/test_logger.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 20244)
+++ ChangeLog	(revision 20245)
@@ -1,3 +1,8 @@
+Tue Nov 18 16:18:23 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/logger.rb (ProgName): fixed for svn, based on a patch from
+	  Nobuhiro IMAI at [ruby-dev:37108].
+
 Tue Nov 18 15:56:55 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* lib/webrick/httprequest.rb (WEBrick::HTTPRequest#read_request_line): 
Index: lib/logger.rb
===================================================================
--- lib/logger.rb	(revision 20244)
+++ lib/logger.rb	(revision 20245)
@@ -181,8 +181,8 @@
 
 class Logger
   VERSION = "1.2.6"
-  /: (\S+),v (\S+)/ =~ %q$Id$
-  ProgName = "#{$1}/#{$2}"
+  id, name, rev = %w$Id$
+  ProgName = "#{name.chomp(",")}/#{rev}"
 
   class Error < RuntimeError; end
   class ShiftingError < Error; end
Index: test/logger/test_logger.rb
===================================================================
--- test/logger/test_logger.rb	(revision 20244)
+++ test/logger/test_logger.rb	(revision 20245)
@@ -23,6 +23,10 @@
     @logger = Logger.new(nil)
   end
 
+  def test_const_progname
+    assert %r!\Alogger\.rb/\S+\z! === Logger::ProgName
+  end
+
   class Log
     attr_reader :label, :datetime, :pid, :severity, :progname, :msg
     def initialize(line)
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 20244)
+++ ruby_1_8/ChangeLog	(revision 20245)
@@ -1,3 +1,8 @@
+Tue Nov 18 16:18:23 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/logger.rb (ProgName): fixed for svn, based on a patch from
+	  Nobuhiro IMAI at [ruby-dev:37108].
+
 Tue Nov 18 09:42:11 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* lib/optparse.rb (OptionParser::make_switch): makes default
Index: ruby_1_8/lib/logger.rb
===================================================================
--- ruby_1_8/lib/logger.rb	(revision 20244)
+++ ruby_1_8/lib/logger.rb	(revision 20245)
@@ -170,8 +170,8 @@
 
 class Logger
   VERSION = "1.2.6"
-  /: (\S+),v (\S+)/ =~ %q$Id$
-  ProgName = "#{$1}/#{$2}"
+  id, name, rev = %w$Id$
+  ProgName = "#{name.chomp(",")}/#{rev}"
 
   class Error < RuntimeError; end
   class ShiftingError < Error; end
Index: ruby_1_8/test/logger/test_logger.rb
===================================================================
--- ruby_1_8/test/logger/test_logger.rb	(revision 20244)
+++ ruby_1_8/test/logger/test_logger.rb	(revision 20245)
@@ -23,6 +23,10 @@
     @logger = Logger.new(nil)
   end
 
+  def test_const_progname
+    assert %r!\Alogger\.rb/\S+\z! === Logger::ProgName
+  end
+
   class Log
     attr_reader :label, :datetime, :pid, :severity, :progname, :msg
     def initialize(line)

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

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