RubyEngine

Provides a RubyEngine to simplify checking on which implementation your Ruby programs is running.

Setup

On your command-line:

$ gem install ruby_engine

In Ruby:

require 'ruby_engine'

Usage

# Output the interpreter name
RubyEngine.to_s

# true for JRuby
RubyEngine.is? 'jruby'

# There are some query methods defined:
RubyEngine.mri?
RubyEngine.jruby?
RubyEngine.rubinius?
RubyEngine.macruby?

Also See

github.com/janlelis/ruby_version | github.com/janlelis/ruby_info | github.com/rdp/os

J-_-L

Copyright © 2010-2014, 2020 Jan Lelis. MIT License. Originated from the zucker gem.