Permalink
Browse files

Bug 20778.

git-svn-id: http://rubygems.rubyforge.org/svn/trunk@1831 3d4018f9-ac1a-0410-99e9-8a154d859a19
  • Loading branch information...
1 parent 89dce8b commit bb0f64e0a56131459d6d3fe91c232a966a311d0f drbrain committed Jun 30, 2008
Showing with 5 additions and 3 deletions.
  1. +2 −0 ChangeLog
  2. +1 −1 lib/rubygems/specification.rb
  3. +2 −2 test/test_gem_specification.rb
View
@@ -10,6 +10,8 @@
appropriate. Minor refactoring of #uninstall.
* lib/rubygems/package/tar_reader.rb: Some OSs raise EINVAL on seek.
Based on patch in bug #20791 by Neil Wilson.
+ * lib/rubygems/specification.rb: Correctly check for support of
+ development dependencies for #to_ruby. Bug #20778 by Evan Weaver.
2008-06-25 Eric Hodel <drbrain@segment7.net>
@@ -861,7 +861,7 @@ def to_ruby
result << " s.specification_version = #{specification_version}"
result << nil
- result << " if current_version >= 3 then"
+ result << " if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then"
unless dependencies.empty? then
dependencies.each do |dep|
@@ -654,7 +654,7 @@ def test_to_ruby
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = #{Gem::Specification::CURRENT_SPECIFICATION_VERSION}
- if current_version >= 3 then
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<b>, [\"= 1\"])
else
s.add_dependency(%q<b>, [\"= 1\"])
@@ -706,7 +706,7 @@ def test_to_ruby_fancy
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 2
- if current_version >= 3 then
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<rake>, [\"> 0.4\"])
s.add_runtime_dependency(%q<jabber4r>, [\"> 0.0.0\"])
s.add_runtime_dependency(%q<pqa>, [\"> 0.4\", \"<= 0.6\"])

0 comments on commit bb0f64e

Please sign in to comment.