Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A collection of patch sets for rvm to allow easy installation of my MRI patches for various ruby versions

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 patches
Octocat-spinner-32 patchsets
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 install.sh
README.rdoc

Patchsets for RVM

About

Over time, I have developed a number of patches to MRI ruby which I use in all my projects. I maintain them using stgit. This repository provides them as patchsets for RVM.

Usage

First install the patchsets into your RVM path:

  • clone the repository to some convenient place

  • cd into the top level directory

  • run install.sh

This will automatically remove old versions of the patchsets.

Second, reinstall the rubies you want to patch:

rvm reinstall 1.8.7 --patch railsexpress
rvm reinstall 1.9.2 --patch railsexpress

Alternatively, you can pass the ruby version to reinstall to the install script:

./install.sh 1.8.7 1.9.2

IF you don't want to mess up your vanilla rubies, pass a -n flag to rvm when installing the patches:

rvm reinstall 1.8.7 --patch railsexpress -n railsexpress
rvm reinstall 1.9.2 --patch railsexpress -n railsexpress

This will then require you to specify the ruby version for rvm like so:

rvm use 1.9.2-railsexpress

Notes

The patches are for specific versions of ruby. They might work with later versions, but there's no guarantee. The following versions are currently supported:

1.8.7-p334  # not recommended, as p352 fixes a serious GC corruption problem
1.8.7-p352  # not recommended, use at least p358
1.8.7-p357  # fixes a DOS vulnerability in 1.8.7
1.8.7-p358  # current rvm default for MRI-ruby 1.8.7
1.9.2-p180  #
1.9.2-p290  #
1.9.2-p318  # current rvm default for MRI-ruby 1.9.2

In order to make some patch level n the default for rvm, add the line

ruby_1.8.7_patch_level=n

to $rvm_path/user/db.

To enable heap dump support, pass the –enable-gcdebug option to the rvm install command.

rvm reinstall 1.8.7 --patch railsexpress -C --enable-gcdebug -n gcdebug
rvm reinstall 1.9.2 --patch railsexpress -C --enable-gcdebug -n gcdebug

If rvm cannot configure your ruby, update your rvm install.

Using patches for ruby-branches (1.8.7 only)

The most recent patch level on the ruby_1_8_7 branch is 360. If you want to use it, you can install the corresponding ruby version with the following command:

rvm reinstall 1.8.7-head --patch railsexpress -n railsexpress

You can then use it with the command

rvm use 1.8.7-head-railsexpress

Note that the patch contained in patch level 359 fixes a serious bug in the ruby marshaling code, which can crash the ruby interpreter.

Credits

Some of the patches are based on the work of others (some of them are included in ruby enterprise edition)

Something went wrong with that request. Please try again.