From 26a07b8b46d0ae775d01c023146881564f285419 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Wed, 11 May 2022 17:03:39 +0100 Subject: Add a separate doc for contributing to stdlibs [ci skip] co-authored-by: Peter Zhu --- doc/contributing/making_changes_to_stdlibs.md | 49 +++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 doc/contributing/making_changes_to_stdlibs.md (limited to 'doc/contributing/making_changes_to_stdlibs.md') diff --git a/doc/contributing/making_changes_to_stdlibs.md b/doc/contributing/making_changes_to_stdlibs.md new file mode 100644 index 0000000000..ef3811ea12 --- /dev/null +++ b/doc/contributing/making_changes_to_stdlibs.md @@ -0,0 +1,49 @@ +# Making Changes To Standard Libraries + +Everything in the [lib](https://github.com/ruby/ruby/tree/master/lib) directory is mirrored from a standalone repository into the Ruby repository. +If you'd like to make contributions to standard libraries, do so in the standalone repositories, and the +changes will be automatically mirrored into the Ruby repository. + +For example, CSV lives in [a separate repository](https://github.com/ruby/csv) and is mirrored into [Ruby](https://github.com/ruby/ruby/tree/master/lib/csv). + +## Maintainers + +You can find the list of maintainers [here](https://docs.ruby-lang.org/en/master/maintainers_rdoc.html#label-Maintainers). + +## Build + +First, install its dependencies using: + +``` +bundle install +``` + +### Libraries with C-extension + +If the library has a `/ext` directory, it has C files that you need to compile with: + +``` +bundle exec rake compile +``` + +## Running tests + +All standard libraries use [test-unit](https://github.com/test-unit/test-unit) as the test framework. + +To run all tests: + +``` +bundle exec rake test +``` + +To run a single test file: + +``` +bundle exec rake test TEST="test/test_foo.rb" +``` + +To run a single test case: + +``` +bundle exec rake test TEST="test/test_foo.rb" TESTOPS="--name=/test_mytest/" +``` -- cgit v1.2.3