Thank you for helping improve ruby-macho.
Install Ruby 3.3 or newer and Bundler, then install the locked dependencies:
bundle installRun the same repository-owned checks used by CI:
bundle exec rakeThat command runs RuboCop, the complete Minitest suite, YARD documentation checks, and a build-and-smoke test of the packaged gem. CI also enforces the current minimum line and branch coverage percentages.
Useful focused commands are:
bundle exec rake test
bundle exec ruby -Ilib -Itest test/test_macho.rb
bundle exec rubocop
bundle exec rake doc
bundle exec rake package_smoke
bundle exec rake benchThe benchmark task requires macOS command-line tools. The library and test suite otherwise run on both macOS and Linux, as reflected in the CI matrix.
You can optionally install the repository's pre-commit checks with:
bundle exec overcommit --install- Add a focused regression test for behavior changes and bug fixes.
- Keep public behavior and limitations documented in
README.mdand YARD comments. - Keep commits focused and include a
Signed-off-bytrailer.git commit -sadds it automatically. - Run
bundle exec rakebefore opening a pull request.
Mach-O fixtures live under test/bin. Prefer a small, source-generated
reproducer over copying a production binary. Sources and generation recipes
live under test/src and test/bin/yaml2obj.
Any new or replaced binary fixture must include:
- the smallest practical source or deterministic generation recipe;
- the upstream source and version, when applicable;
- a SHA-256 digest for externally built artifacts;
- the reason the fixture is necessary and the test that exercises it; and
- its license and attribution requirements.
LLVM-derived malformed fixtures retain their license in
test/bin/llvm/LICENSE.txt. Update the README attribution and keep applicable
license material adjacent to any new third-party fixture.
Use GitHub Issues for ordinary bugs. Report suspected vulnerabilities privately through GitHub's security advisory form and follow Homebrew's security policy.