On Jul 15, 2011, at 06:24 , Daniel Berger wrote:
> I noticed in platform.rb we have what appears to a redundant regular
> expression and some things that are too strict. Regarding the redundant regex
> I see this on line 75-76 of platform.rb:
>
> when /^dotnet$/ then [ 'dotnet', nil ]
> when /^dotnet([\d.]*)/ then [ 'dotnet', $1 ]
>
> What case does the first one cover that the second one doesn't?
I assume that the latter should be "+", not "*"? Sounds like a valid bug to me.
> Also, it seems the regexen for aix, freebsd, hpux, openbsd and solaris are
> too strict. If no version is specified the os will come back as "unknown".
> For example:
>
> irb(main):001:0> Gem::Platform.new("universal-solaris10.2")
> => #<Gem::Platform:0x85988c @cpu="universal", @os="solaris", @version="10.2">
>
> irb(main):002:0> Gem::Platform.new("universal-solaris")
> => #<Gem::Platform:0x857780 @cpu="universal", @os="unknown", @version=nil>
>
> Other platforms allow an OS to be set with a nil version. Why not those? I
> can get around it manually, but would rather not have to. I would suggest
> that these be modified to make the digits optional as they currently are for
> darwin.
Probably also bugs. Please file a ticket and feel free to assign to me.
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
[email protected]
http://rubyforge.org/mailman/listinfo/rubygems-developers