Skip to content

Commit 53edfbd

Browse files
committed
Add steps how to update a bundled gem to the Updating Ruby document
1 parent 61fd501 commit 53edfbd

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

doc/contributor/updating-ruby.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,43 @@ To update a specific default gem to a newer version than in the MRI release, run
2727
```
2828
cd ruby
2929
git checkout -b truffleruby-updates-$VERSION vn_n_n
30+
cd ..
31+
git clone git@github.com:ruby/<gem>.git
32+
cd <gem>
33+
git checkout v<gem-version>
34+
cd ../ruby
3035
ruby tool/sync_default_gems.rb $GEM
3136
3237
git push -u eregon HEAD
3338
```
3439
to update the default gem in MRI.
3540
Then follow the instructions below to reimport MRI files and to update default gems.
3641

42+
Another way to update a gem to a specific version is to pass a commits range:
43+
44+
```
45+
ruby tool/sync_default_gems.rb <gem-name> <sha1-of-currently-imported-version>..<sha1-of-a-new-version>
46+
```
47+
48+
Run `ruby tool/sync_default_gems.rb --help` to get other ways to run the script.
49+
50+
## Updating a specific bundled gem
51+
52+
Set new version of the bundled gem in `gems/bundled_gems` in a Ruby source code directory.
53+
54+
Build Ruby (currently supported version) with the following commands:
55+
56+
```
57+
./autogen.sh
58+
mkdir ~/.rubies
59+
./configure --prefix="${HOME}/.rubies/ruby-$VERSION-updated-gems" --disable-install-doc
60+
make -j8 install-nodoc
61+
```
62+
63+
Use `~/.rubies/ruby-$VERSION-updated-gems` directory as a source for copying a new bundled gem version.
64+
65+
Follow instructions how to update default and bundled gems.
66+
3767
## Setup
3868

3969
Set the environment variable `$VERSION` to the target version:

0 commit comments

Comments
 (0)