I can't recommend RVM highly enough. Not only will it let you easily switch between MRI (the standard ruby interpreter) versions. It'll also let you switch just as easily between other interpreters such as JRuby, Rubinius, Ruby Enterprise Edition, etc.
Hivelogic has good overall instructions on installing your own version of ruby in /usr/local here: http://hivelogic.com/articles/ruby-rails-leopard
The steps are the same for installing 1.8.7 or 1.9, you just change the version of Ruby that you download.
Other people have mentioned RVM, so I don't need to, but you may also want to check out JRuby (http://jruby.org). Your startup time will suffer, but your runtime will be quite a bit faster. :)