Now is a fantastic time to follow Ruby’s development. With the increased attention Ruby has received in the past few years, there’s a growing need for good talent to help enhance Ruby and document its parts. So, where do you start?
The topics related to Ruby development covered here are:
Using Git to Track Ruby Development
The current primary repository of the latest Ruby source code is git.ruby-lang.org/ruby.git. There is also a mirror on GitHub. Usually, please use this mirror.
You can get the latest Ruby source code by using Git. From your command line:
The ruby
directory will now contain the latest source code
for the development version of Ruby (ruby-trunk).
See also Non-committer’s HOWTO to join our development.
If you have commit access, and if you want to push something, you should use the primary repository.
Improving Ruby, Patch by Patch
The core team maintains an issue tracker for submitting patches and bug reports to Matz and the gang. These reports also get submitted to the Ruby-Core mailing list for discussion, so you can be sure your request won’t go unnoticed. You can also send your patches straight to the mailing list. Either way, you are encouraged to take part in the discussion that ensues.
Please look over the Patch Writer’s Guide for some tips, straight from Matz, on how to get your patches considered.
To summarize, the steps for building a patch are:
-
Check out a copy of the Ruby source code from GitHub. Usually patches for bugfixes or new features should be submitted for the trunk of Ruby’s source.
$ git clone https://github.com/ruby/ruby.git
If you are fixing a bug that is specific to only one maintenance branch, check out a copy of the respective branch.
$ git checkout ruby_X_X
X_X should be replaced with a version that you want to check out.
-
Add your improvements to the code.
-
Create a patch.
$ git diff > ruby-changes.patch
-
Create a ticket in the issue tracker or email your patch to the Ruby-Core mailing list with a ChangeLog entry describing the patch.
-
If there are no issues raised about the patch, committers will be given the approval to apply it.
Please note: patches should be submitted as a unified diff. For more on how patches are merged, see the diffutils reference.
Discussion of Ruby’s development converges on the Ruby-Core mailing list. So, if you are curious about whether your patch is worthwhile or you want to spark a discussion about Ruby’s future, don’t hesitate to come aboard. Be warned that off-topic discussions are not tolerated on this list, the noise level should be very low, topics should be pointed, well-conceived and well-written. Since we’re addressing Ruby’s creator, let’s have some reverence.
Keep in mind that many of Ruby’s core developers live in Japan and, while many speak very good English, there is a significant timezone difference. They also have an entire body of Japanese development lists happening alongside the English counterparts. Be patient, if your claim isn’t resolved, be persistent—give it another shot a few days later.
Note about branches
The source code of Ruby had been managed under Subversion repository until 22nd April 2019. Thus, some branches may still be managed under Subversion. You can view the SVN repository.
However, you don’t have to care about it (unless you are a branch maintainer). You can check out the branches in your Git working copy. For example, run the following command.
X_X should be replaced with a version that you want to check out.
If you want to modify the branches, please open an issue in our issue tracker. See also the following section.