summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-22 14:52:06 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-22 14:52:06 +0000
commit1e92c0b98b6a1ea31c57284747033ec6672c2c9c (patch)
tree1dd7456bdd7c9118732b6cae422364ff9c5ba413
parentdc3c09cbe0af8887a6e6d3bc5cbf2050f476f55f (diff)
merges r20290 from trunk into ruby_1_9_1
* lib/logger.rb (Logger): should handle the case that cvs/svn do not expand $Id keyword. [ruby-core:19991] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/logger.rb8
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4810f7e9f2..9b577ea6da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Nov 20 07:33:15 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* lib/minitest/unit.rb (MiniTest::Assertions#capture_io): adjust
diff --git a/lib/logger.rb b/lib/logger.rb
index 26d7d9d560..07699e7017 100644
--- a/lib/logger.rb
+++ b/lib/logger.rb
@@ -182,7 +182,13 @@ require 'monitor'
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