It might seem crazy to you, but sometimes, people just want to add wacky features to their programming language of choice. Sometimes, they’re useful, sometimes, they’re just fun. Any time you’re working on getting a new feature implemented, it’s really nice to be able to say “Here’s the code!”
Michael Edgar is one of those people. He also had the foresight to notice that rvm makes it really easy to build your own custom Ruby, with patches. So he’s created a repository where people can share experimental Ruby patches, and is working on making the integration with rvm even easier.
Let’s say, for example, you want to try out Refinements, which are a proposed feature for Ruby 2.0. Here’s the old way, without rvm:
$ svn checkout -q -r 29837 http://svn.ruby-lang.org/repos/ruby/trunk ruby-refinements $ cd ruby-refinements $ curl http://stuff.judofyr.net/refinements.diff | patch -p1 $ autoconf $ ./configure --prefix /usr/local/ruby-refinements $ make $ make install $ export PATH="/usr/local/ruby-refinements/bin:$PATH"
With rvm and this repository, you could instead
$ rvm install 1.9.2-head --patch 1.9/refinements/refinements.diff -n refinedruby
$ rvm use refinedruby
and bam! You’re done!
He’s also got fun patches for JRuby, as well. If you’ve got one you’d like to add, fork the repo and make a pull request!
View the source on GitHub.