TalentBox/sequel-rails — pull request #23 by edruder (2013-03-12 19:53:38+00:00)
Title: Improved the JRuby check

- We discovered the bug that you already mostly-fixed in one of @JackDanger's recent pull requests. Since the bug still exists, this fixes it.
- ``ENV['RUBY_VERSION']`` under JRuby will be something like ``"ruby-1.9.3-p327"``.
- ``JRUBY_VERSION`` will be defined and something like ``"1.7.2"`` under JRuby and undefined other rubies.
- I would write the ``SequelRails.jruby?`` method without memoization (because there
are no performance ramifications) as a one-liner, but it's a style preference:

```ruby
def self.jruby?
(defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby") || defined?(JRUBY_VERSION)``
end
```