In article <488CCF46.6000806 / sun.com>, Charles Oliver Nutter <charles.nutter / sun.com> writes: > It's not quite that simple, since just having specific libraries doesn't > mean they're exactly the same. And there are many libraries that may be > only partially implemented on a given implementation. For example, > callcc doesn't exist on JRuby, but you can't find that out without > trying to call it. So you need a missing method check. JRuby has no > syslog at present, so you need a load error check. Agreed. It should be possible to test a method is really implemented without calling it. So I implemented a way to do it. In [ruby-dev:34707], I implemented respond_to? returns false for a method which just raises NotImplementedError. I think RUBY_ENGINE is not appropriate way to test a method. > And this doesn't help RubyGems. If there's three different versions of a > gem, one that works on Rubinius, one that works on JRuby, one that works > on MRI...how should it choose the right one? By checking > implementation-specific config information? By trying to load libraries > that don't work today (but might work tomorrow)? There's too much > complication in figuring out "which Ruby impl am I running", and adding > a variable to explicitly state it is a clean, simple way to do it. I heard Rubinius can use Ruby's extension library written in C. Do we need different gems for Rubinius and MRI? -- Tanaka Akira