Skip to content

Commit

Permalink
Reduce number of lines (@charliesome).
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Mar 25, 2013
1 parent cfbe5e2 commit ed41bf5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions share/chruby/chruby.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -40,13 +40,10 @@ function chruby_use()
export PATH="$RUBY_ROOT/bin:$PATH" export PATH="$RUBY_ROOT/bin:$PATH"


eval `$RUBY_ROOT/bin/ruby - <<EOF eval `$RUBY_ROOT/bin/ruby - <<EOF
begin; require 'rubygems'; rescue LoadError; end
puts "export RUBY_ENGINE=#{defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'};" puts "export RUBY_ENGINE=#{defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'};"
puts "export RUBY_VERSION=#{RUBY_VERSION};" puts "export RUBY_VERSION=#{RUBY_VERSION};"
begin puts "export GEM_ROOT=#{Gem.default_dir.inspect};" if defined?(Gem)
require 'rubygems'
puts "export GEM_ROOT=#{Gem.default_dir.inspect};"
rescue LoadError
end
EOF` EOF`
if [[ ! $UID -eq 0 ]]; then if [[ ! $UID -eq 0 ]]; then
Expand Down

0 comments on commit ed41bf5

Please sign in to comment.