checkout the latest rails trunk into your /vendor directory

svn co http://dev.rubyonrails.org/svn/rails/trunk rails

now you will have a rails directory under the vendor directory and you can modify the code as you please... *note: this rails code is what will be used now instead of the current installed version of rails