Skip to content

v0.27.0

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Nov 06:57
· 2 commits to master since this release

Maintained fork of tree-sitter-ruby. Changes since 0.26.0:

Parsing

  • Checked on all 78,129 Ruby files of Rails, Discourse, GitLab and Mastodon: every one now agrees with Prism. Two fixes came out of it:
    • a call with arguments after a command's do block, as RSpec writes it: expect(x).to receive(:y) do … end.and_return(z), and chains like end.c(1).d;
    • + 1.abs with a space is +(1.abs), as in Ruby.
  • A string key in a hash pattern binds its name: after in {"name":}, name +1 is name + 1.
  • Heredocs: a line that repeats the end word (EOSEOS) and a lone carriage return no longer end the body.

Queries

  • highlights.scm: the implicit block parameters it and _1 to _9 are parameters, no longer method calls. it "..." do in RSpec stays a call.
  • locals.scm: in {name:}, in {"name":}, in (x) and in _a | _b define their names, so later uses are variables.

Quality and security

  • The tests run 97.7 % of the scanner's lines and 92.4 % of its branches; CI fails if that drops.
  • The scanner builds without warnings under gcc and clang (-Wall -Wextra -Wpedantic -Wshadow -Werror).
  • Fuzzing with ClusterFuzzLite: five minutes per sanitizer on each pull request that touches the parser, an hour each every night.
  • OpenSSF Best Practices badge (passing) and an OpenSSF Scorecard; SECURITY.md with private vulnerability reporting, and CONTRIBUTING.md.
  • Performance history of every release since upstream 0.23.1.

On npm (@magikdidi24/tree-sitter-ruby), crates.io and PyPI (tree-sitter-ruby-magikdidi24).


NOTE: Download tree-sitter-ruby.tar.gz for the complete source code.