[Rubygems-developers] cannot specify multiple required_ruby_versions.

Luis Lavena luislavena at gmail.com
Sat Dec 29 11:07:08 EST 2007


On Dec 29, 2007 11:59 AM, Austin Ziegler <halostatue at gmail.com> wrote:
>
> What about
>
>   spec.required_ruby_version = "~>1.8.4"
>
> That should allow anything up to 1.8.9.9.9.9.9.9....
>

You're correct Austin, actually I'm using that on some gems:

irb(main):001:0> a = Gem::Requirement.create("~>1.8.4")
=> #<Gem::Requirement:0x2bc9470 @version=nil, @requirements=[["~>", #<Gem::Versi
on "1.8.4">]]>
irb(main):002:0> v1 = Gem::Version.new("1.8.6")
=> #<Gem::Version "1.8.6">
irb(main):003:0> v2 = Gem::Version.new("1.9.0")
=> #<Gem::Version "1.9.0">
irb(main):004:0> a.satisfied_by?(v1)
=> true
irb(main):005:0> a.satisfied_by?(v2)
=> false

===

But the point about this mail was to comment about the lack of
checking of required_ruby_version illformed values during creation and
installation of the gem.

-- 
Luis Lavena
Multimedia systems
-
A common mistake that people make when trying to design
something completely foolproof is to underestimate
the ingenuity of complete fools.
Douglas Adams


More information about the Rubygems-developers mailing list