From: Marc Haisenko Date: 2008-04-04T00:45:39+09:00 Subject: Re: RUBY_IMPLEMENTATION On Thursday 03 April 2008, 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 personally think the name length is OK, but what about having a hash that returns all this info ? In that case a different name might be better, e.g. info = RUBY_INTERPRETER puts info[:name] puts info[:version] puts info[:platform] I know, you'd have duplicate information here (:version, :platform). The advantage with the hash would be that an implementation would be able to provide some aditional information through it in a sane way: puts info[:flavour] # e.g. whether some special features are enabled Marc -- Marc Haisenko Comdasys AG R�desheimer Str. 7 80686 M�nchen Germany Tel.: +49 (0)89 548 433 321