Hi all,
I would like to propose that the value of RUBY_PLATFORM is
standardized across all implementations running on a particular OS +
arch. The basic idea is that any Ruby code could examine this value to
determine particular needs for that platform. There are two main
reasons for this:
1. Simplify the RubySpec cases for any methods that interact with the
underlying OS (e.g. chmod)
2. Simplify Ruby code that needs to have conditional behavior based on
platform without caring what implementation it runs on
Charles Nutter suggested in the Ruby design meeting on June 4/5, that
the value of RUBY_PLATFORM should reflect the layer just below Ruby
code, which is really the implementation. That layer should be
identified by RUBY_ENGINE instead. The value of RUBY_ENGINE has been
agreed on but I don't believe it's been implemented anywhere outside
of Rubinius. RUBY_ENGINE would be 'ruby' on MatzRuby, 'jruby' on
JRuby, 'rbx' on Rubinius, and undefined as yet AFAIK on IronRuby,
MacRuby, and MagLev.
I strongly suggest that RUBY_ENGINE and *not* RUBY_PLATFORM be used to
identify the layer just below Ruby code. Instead, RUBY_PLATFORM should
represent the layer below the Ruby implementation.
Curious about your thoughts. Can we standardize the value of
RUBY_PLATFORM? This is a really big issue for the RubySpecs and also
for user code as the number of different implementations proliferate.
Cheers,
Brian