Project

General

Profile

Actions

Bug #8877

closed

OptionParser::Version should not rely on SVN

Added by hasari (Hiro Asari) over 10 years ago. Updated over 10 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.0dev (2013-08-02 trunk 42320) [x86_64-darwin12.4.0]
[ruby-core:57069]

Description

=begin
Currently, (({OptionParser::Version})) is ((<defined|URL:https://github.com/ruby/ruby/blob/2b44bbf/lib/optparse.rb#L215-L216>)) by:

RCSID = %w$Id$[1..-1].each {|s| s.freeze}.freeze
Version = (RCSID[1].split('.').collect {|s| s.to_i}.extend(Comparable).freeze if RCSID[1])

This assumes that before this file is invoked, something preprocesses this file and rewrites (({$Id$})). This is not the case with (({git})).

As a result, if you build from the git clone, you'd get

irb(main):001:0> RUBY_DESCRIPTION
=> "ruby 2.1.0dev (2013-08-02 trunk 42320) [x86_64-darwin12.4.0]"
irb(main):002:0> require 'optparse'
=> true
irb(main):003:0> OptionParser::Version
=> nil

While I understand the history of the development process and Ruby core's professed affinity for SVN, but this strikes me as a very bad idea.

=end

Actions #1

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r42889.
Hiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


optparse.rb: remove $Id$

  • lib/optparse.rb (OptionParser): remove constants depending on $Id$.
    [Bug #8877]
Actions

Also available in: Atom PDF

Like0
Like0