exbinary
3/1/2009 - 1:25 PM

gistfile1.sh

# Note: this script has to be sourced, just running it won't help

if [ '1.8' == $(ruby -e 'puts RUBY_VERSION[0,3]') ]; then
  export PATH=/usr/local/ruby1.9/bin:$PATH
else
  export PATH=$(echo $PATH | sed -e 's@/usr/local/ruby1.9/bin:@@')
fi

echo $(ruby -v)