On 25/07/2008, Tanaka Akira <akr / fsij.org> wrote:
> In article <3454c9680807250045q6d3ecbe8n2692c899dc62a94a / mail.gmail.com>,
>
>   "Vladimir Sizikov" <vsizikov / gmail.com> writes:
>
>
> > It could just be "mri'. For version numbers, you could then inspect
>
>
> RubyGems uses RUBY_ENGINE as a directory name:
>
>  lib/rubygems/defaults.rb:
>
>   def self.default_dir
>     if defined? RUBY_FRAMEWORK_VERSION then
>       File.join File.dirname(ConfigMap[:sitedir]), 'Gems',
>                 ConfigMap[:ruby_version]
>     elsif defined? RUBY_ENGINE then
>       File.join ConfigMap[:libdir], RUBY_ENGINE, 'gems',
>                 ConfigMap[:ruby_version]
>     else
>       File.join ConfigMap[:libdir], 'ruby', 'gems', ConfigMap[:ruby_version]
>     end
>   end
>
>  If RUBY_ENGINE is "mri", libdir/mri/gems/version is used as default_dir.
>
>  I guess RubyGems expects "ruby".

I guess this is bogus since there is no guarantee that RUBY_ENGINE is
in any way related to filesystem. Wether it's the executable name or
the ruby flavour RubyGems should use the ruby config variables to
determine library directory, not RUBY_ENGINE.

The variable name lends itself easily to both uses so I guess a
different name should be used for both features to avoid confusion.

Thanks

Michal