Skip to content

Instantly share code, notes, and snippets.

@acook
Last active December 21, 2015 00:28
Show Gist options
  • Save acook/6220088 to your computer and use it in GitHub Desktop.
Save acook/6220088 to your computer and use it in GitHub Desktop.
begin; require 'rubygems'; rescue LoadError; end
eng = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'
gems = defined?(Gem) ? Gem.default_dir : "/usr/lib/#{eng}/gems/#{ver}"
(RUBY_VERSION.split('.') +
[RUBY_PATCHLEVEL, RUBY_REVISION, eng, RUBY_PLATFORM]).
each_with_index { |v, i| puts "RUBY_VERINFO[#{i}]=#{v}" }
puts "GEM_ROOT=#{gems}"
RUBY_VERINFO[0]=2
RUBY_VERINFO[1]=0
RUBY_VERINFO[2]=0
RUBY_VERINFO[3]=247
RUBY_VERINFO[4]=41674
RUBY_VERINFO[5]=ruby
RUBY_VERINFO[6]=x86_64-darwin12.3.0
GEM_ROOT=/Users/acook/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment