Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

helper for checking the current ruby runtime/engine/version

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gems
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 rakefile.rb
Octocat-spinner-32 readme.textile
Octocat-spinner-32 which_ruby.gemspec
readme.textile

About

which_ruby is a simple helper for checking running Ruby engines.

Usage

include WhichRuby in irb:

rvm use jruby
gem install which_ruby
irb
 > require 'which_ruby'
=> true 
 > include WhichRuby
=> Object

access the API:

 > ruby_type
=> :jruby
 > rt
=> :jruby
 > is_ruby_type? :jruby
=> true 
 > r? :jruby
=> true 
 > jruby?
=> true

define execution scopes:

 > ruby_scope(:jruby){"foo"}
=> "foo"
 > ruby_scope(:rbx){"foo"}
=> nil

Examples

Run the examples with different runtimes, jruby for example:

rvm use jruby
ruby examples/ex.rb

TODO

  • improve me!
  • more docs
  • more todos
Something went wrong with that request. Please try again.