This page is for people who want to contribute patches to Ruby. If you want to report a bug, see HowToReport.
New features will only be considered for the Ruby master branch, not for already released versions. Patches for bug fixes should first be applied to the master branch. They can be backported to supported versions later by the appropriate branch maintainer. However, if the bug does not exist in a master branch, a separate bug fix can be proposed directly to a supported version.
Search previous discussions in ruby-core or on Redmine before submitting a bug fix or feature request.
For both bug fixes and new features, add tests under
test and/or specs under
spec that do not pass before the new change and pass after the change. Use
make check to make sure all tests pass.
For significant new features, consider whether a change to
NEWS.md is appropriate. For other new features, make sure to update the related method or class documentation.
Patches should apply to the Ruby master branch, except when the patch is a bugfix and the bug exists only in a maintenance branch.
Patches must be submitted in unified diff format (
diff -pu or
git diff). Linking to GitHub Pull Request on ruby/ruby is also ok.
Don't introduce cosmetic changes, follow the coding style of the code you are modifying.
Don't mix different changes in one issue/patch/commit.
Benchmark scripts should be in separate files under
benchmark directory, commit logs are not for benchmarking.
Make a Redmine ticket as Bug or Feature, and it will be forwarded to ruby-core (or ruby-dev). Use Bug only if you are sure the behavior is a bug in Ruby that should be fixed and potentially backported.
Sending a pull request to https://github.com/ruby/ruby is acceptable for minor fixes. However, pull requests which need to be discussed will likely be ignored unless you create a Redmine ticket.
A ticket may be ignored by accident (because reviewers are busy, and so on). In this case, you can ping the ticket if there is no activity after a couple weeks.
You may also add your ticket to the topics of an upcoming Developers Meeting under "From non-attendees" (see "Developer Meetings" on the wiki main page).
License Issues Related to Patch Submission¶
You must agree that your patch will be licensed under Ruby's License. If Ruby's license is changed in the future, it will be assumed that you agree with the change unless you object to the change in time.