[Rubygems-developers] Questions about Gem Platform Matching

Luis Lavena luislavena at gmail.com
Mon Oct 1 19:21:02 EDT 2007

On 10/1/07, Eric Hodel <drbrain at segment7.net> wrote:
> On Sep 30, 2007, at 08:38 , Luis Lavena wrote:
> >> Should we make this check in Gem::Platform.local and choose x86-
> >> mswin32-80 or x86-mswin32-60 (I think those are right) based on which
> >> one it is?
> >>
> >
> > This sounds good, since Ruby set the platform to mswin32_80 .. adding
> > -60 to the VC6 version sounds right.
> I modified your patch and committed this:
> Does it look right?

It seems, but no.

The case matching msvcrt seems a bit odd, since a few test fails:

  1) Failure:
    [test/test_gem_platform.rb:66:in `test_initialize'
     test/test_gem_platform.rb:64:in `each'
     test/test_gem_platform.rb:64:in `test_initialize']:
<["x86", "mswin32", nil]> expected but was
<["x86", "mswin32", "60"]>.

  2) Failure:
test_initialize_command_line(TestGemPlatform) [test/test_gem_platform.rb:75]:
<["x86", "mswin32", nil]> expected but was
<["x86", "mswin32", "60"]>.

  3) Failure:
test_initialize_mswin32_vc6(TestGemPlatform) [test/test_gem_platform.rb:92]:
i386-mswin32 VC6.
<["x86", "mswin32", "nil"]> expected but was
<["x86", "mswin32", "60"]>.

  4) Failure:
test_to_s(TestGemPlatform) [test/test_gem_platform.rb:124]:
<"x86-mswin32"> expected but was

I'm working on a up-to-date patch for this.


RUBY_PLATFORM == 'i386-mswin32' should be ['x86', 'mswin32', '60']
(and nil seems valid too).

RUBY_PLATFORM == 'i386-mswin32_80' should be ['x86', 'mswin32', '80']

> (Next changelog commit will have proper credit, oops!)

No problem :-)

Luis Lavena
Multimedia systems
Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi

More information about the Rubygems-developers mailing list