diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/optparse.rb | 3 | ||||
| -rw-r--r-- | lib/optparse/optparse.gemspec | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb index ea6844b955..dcd980f874 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -426,7 +426,8 @@ require 'set' unless defined?(Set) # class OptionParser # The version string - OptionParser::Version = "0.7.0.dev.2" + VERSION = "0.7.0.dev.2" + Version = VERSION # for compatibility # :stopdoc: NoArgument = [NO_ARGUMENT = :NONE, nil].freeze diff --git a/lib/optparse/optparse.gemspec b/lib/optparse/optparse.gemspec index 6ea6b88395..885b0ec380 100644 --- a/lib/optparse/optparse.gemspec +++ b/lib/optparse/optparse.gemspec @@ -3,7 +3,7 @@ name = File.basename(__FILE__, ".gemspec") version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir| break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line| - /^\s*OptionParser::Version\s*=\s*"(.*)"/ =~ line and break $1 + /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1 end rescue nil end |
