From: Chris Cummer Date: 2008-04-05T02:15:20+09:00 Subject: Re: RUBY_IMPLEMENTATION On 4-Apr-08, at 3:05 AM, Eleanor McHugh wrote: > Well RUNTIME makes more sense to me than ENGINE, but it still > suggests that code should be written to suit a particular runtime > when what coders really want to know is what FEATURES are available > on the platform. > > I therefore favour a constant RUBY_FEATURES This is the first time I've seen this particular suggestion put forth and at the risk of being heretical, what about both? I see merit in Alex's use-case (though I'm not fond of the over- loading of "require"; perhaps feature_exists?() instead?): > begin > feature_exists?( Features.threading.native ) > setup_code_for_native_threads() > FeatureSet::Threading::Native # => true > rescue LoadError > feature_exists?( Features.threading.green ) # or let this be a > default > setup_code_for_green_threads() > FeatureSet::Threading::Green # => true > FeatureSet::Threading::Native # => false > end yet at the same time it feels right to be able to "know" as much as possible about the actual environment in which the code is running. Of all the proposed suggestions I find RUNTIME to be the most palatable. Regards Chris