First of all you must update ruby-build to update definitions list.
brew updateAnd update ruby-build
brew upgrade ruby-buildruby-build --definitionsruby-build 2.2.0 ~/.rubies/ruby-2.2.0chruby ruby-2.2.0chrubyecho "2.2.0" > .ruby-versionOn Yosemite I've encountered a problem with irb and pry : when I use and accent char like é this appears like unicode \U+FFC3\U+FFA9.
To fix this, I installed readline :
brew install readlineRemove ruby install ( 2.2.2 in my case ) :
rm -rf ~/.rubies/ruby-2.2.2Reinstall ruby 2.2.2
ruby-build 2.2.2 ~/.rubies/ruby-2.2.2Ruby-build will automatically detect and use readline to enable UTF-8 input.
Some sources :