From: Jamis Buck Date: 2004-07-04T07:35:34+09:00 Subject: Re: Best way to determine if running on windows or unix-based system Carl Youngblood wrote: > I'm going to try using Ruby/DL to write a full-fledged ruby extension > for the curl library. I'd like it to work on both Windows and > Unix-based systems. I'm sure there are a lot of ways of doing this, > but what do you guys think is the best way to determine whether your > script is being called on a windows-based system or a unix-based > system? There is a constant, RUBY_PLATFORM, which tells you this. On my system: ruby -e "p RUBY_PLATFORM" --> "i686-linux-gnu" - Jamis -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis ruby -ropenssl -e'k="01234567";p((c,c.padding,c.iv,c.key=OpenSSL::Cipher::BF.new,0,k,k*2)[0].decrypt.update("1A81803C452C324619D319F980D5B84DBB45FC0FE2BAA045".scan(/../).map{|n|n.to_i(16).chr}.join))'