Project

General

Profile

Bug #1978

fixed crash in lib/logger.rb from dependency on svn keywork expansion

Added by stepheneb (Stephen Bannasch) about 10 years ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 1.8.6 (2009-08-05 patchlevel 384) [i686-linux]
[ruby-core:25027]

Description

=begin
When I build Ruby 1_8_6 from a git checkout logger.rb crashes because it operates on a string that it expects to be expanded when the sources are checked out with Subversion.

This is a problem when building Ruby from source when cloned from a git repository such as: git://github.com/rubyspec/matzruby.git.

Without this fix logger.rb:174 throws this error:

private method `chomp' called for nil:NilClass (NoMethodError)

The problem occurs because line 173 looks something like this in the source when checked out with subversion:

id, name, rev = %w$Id: logger.rb 11708 2007-02-12 23:01:19Z shyouhei $

but it looks like this when checked out with git:

id, name, rev = %w$Id$

I haven't looked yet but I suspect this is a problem in 1_8_7 and the 1_9 series.

If logger.rb hasn't changed then this patch should work for those branches also.
=end


Files

History

#1

Updated by stepheneb (Stephen Bannasch) about 10 years ago

=begin
While the dependence on the subversion keyword expansion has been present for a while the crash only started after this commit by shyouhei:

 svn rev: 22283
 branch: ruby_1_8_6
 Fri Feb 13 2009 05:18:12 GMT-0500 (EST)
 merge revision(s) 20245,20247: * lib/logger.rb (ProgName): fixed for svn, based on a patch from Nobuhiro IMAI at [ruby-dev:37108].

Which was the resolution for this earlier issue:

http://redmine.ruby-lang.org/issues/show/759
=end

#2

Updated by wyhaines (Kirk Haines) about 10 years ago

=begin
On Fri, Aug 21, 2009 at 3:38 PM, Stephen Bannaschredmine@ruby-lang.org wrote:

Issue #1978 has been updated by Stephen Bannasch.

While the dependence on the subversion keyword expansion has been present for a while the crash only started after this commit by shyouhei:

   svn rev: 22283
   branch: ruby_1_8_6
   Fri Feb 13 2009 05:18:12 GMT-0500 (EST)
   merge revision(s) 20245,20247: * lib/logger.rb (ProgName): fixed for svn, based on a patch from Nobuhiro IMAI at [ruby-dev:37108].

Which was the resolution for this earlier issue:

 http://redmine.ruby-lang.org/issues/show/759

http://redmine.ruby-lang.org/issues/show/1978


http://redmine.ruby-lang.org

Thanks Stephen. I'll take a look at this shortly.

Kirk Haines

=end

#3

Updated by stepheneb (Stephen Bannasch) about 10 years ago

=begin
Kirk,

Can you let me know if there is anything else I need to do to get this patch into 1_8_6?

I'd like to use git to manage the deployment of ruby to several servers and it would be easier to be able to refer to a tag where this problem was fixed.

In the meantime I'll maintain a separate branch named: '1_8_6_383_fix_logger' here

https://github.com/stepheneb/matzruby

=end

#4

Updated by naruse (Yui NARUSE) almost 10 years ago

  • Status changed from Open to Assigned
  • Assignee set to wyhaines (Kirk Haines)

=begin

=end

#5

Updated by jeremyevans0 (Jeremy Evans) about 2 months ago

  • Backport set to 2.5: UNKNOWN, 2.6: UNKNOWN
  • Status changed from Assigned to Closed
  • Description updated (diff)
  • Project changed from Backport186 to Ruby master

Also available in: Atom PDF