From: James Tucker Date: 2008-04-05T23:26:00+09:00 Subject: Re: RUBY_IMPLEMENTATION On 3 Apr 2008, at 15:41, Yukihiro Matsumoto wrote: > Hi, > > I met with Wayne Kelly (of Ruby.NET) at the JAOO RubyFools > conference. That means I have met all primary developers of all major > Ruby implementations. Yay. > > He asked me how we can distinguish the implementation from program. > Currently RUBY_PLATFORM gives you the platform the implementation is > on. RUBY_VERSION gives you the version but it is the language > version. Probably we need to introduce a new constant to represent > the implementation of the running VM. > > What do you think the constant name should be? > RUBY_IMPLEMENTATION? Too long? > > matz. > I've been trying to stay in the background on this, as I don't really get involved with any of the interpreters, but all I can say is that I'd rather avoid this: RUBY_PLATFORM =~ /(ms|cyg)win|mingw/ So if it's possible to make it something that is semantically stronger than just a string, that would be wonderful! The reasoning is simple: RUBY_PLATFORM =~ /cygwin/; fork(); # is legal RUBY_PLATFORM =~ /mswin|mingw/; fork(); # raises error And yet cygwin is still 'Windows' in other regards. I guess all I'm saying is it would be useful to me as a developer, with variables of this nature, for there to be a well defined split between platforms specific features and implementation details. Kind regards, J.