From: "Berger, Daniel" Date: 2005-06-29T23:57:46+09:00 Subject: Re: Smart(er) platform detection > -----Original Message----- > From: Matt Mower [mailto:matt.mower@gmail.com] > Sent: Wednesday, June 29, 2005 8:49 AM > To: ruby-talk ML > Subject: Re: Smart(er) platform detection > > > On 6/29/05, Daniel Berger wrote: > > > It seems like this provides a lot better information than > I can get > > > from RUBY_PLATFORM but is in the form of a C extension > which doesn't > > > suit me. It might be exactly right for some other folks though. > > > > > If it helps soothe your mind, the Win32 version is pure Ruby. :) > > > > I'm not clear what this means. Can it be distributed as a > gem for use on Windows ,Unix, and other platforms? It means there's a separate source file and installation instructions for Windows. The Windows version, in the file windows.rb, uses the Win32OLE package and is good only on the Windows platform. The *nix version, in the unix.c file, is used for everything else, and must be built using the "ruby extconf.rb; make; make site-install" routine. As for a gem, I haven't made one because of a bug (I think) within rubygems when it comes to C extensions for packages with nested names, e.g. "sys/uname" - it puts the .so file in the wrong directory. In the case of "sys-uname", it ends up sticking the shared object under "lib" instead of "lib/sys". Clear as mud? Regards, Dan