Skip to main content

tree-sitter-ruby

CI release npm crates pypi coverage openssf best practices scorecard performance playground discord matrix

Ruby grammar for tree-sitter, a maintained fork of tree-sitter/tree-sitter-ruby. Try it in the playground.

Install

The import names are the upstream ones (tree_sitter_ruby), so only the dependency changes:

cargo add tree-sitter-ruby-magikdidi24
npm install @magikdidi24/tree-sitter-ruby
pip install tree-sitter-ruby-magikdidi24
go get github.com/Magikdidi24/tree-sitter-ruby@v0.25.0

Editors

Editors fetch upstream's grammar by default; point them at this repository instead. They need a tree-sitter 0.25 or newer runtime (ABI 15). The editors' own Ruby queries work with this grammar.

Neovim with nvim-treesitter (main branch), then :TSInstall! ruby:

vim.api.nvim_create_autocmd('User', { pattern = 'TSUpdate', callback = function()
  local info = require('nvim-treesitter.parsers').ruby.install_info
  info.url = 'https://github.com/Magikdidi24/tree-sitter-ruby'
  info.revision = 'df14fbe651cb06eeec66ec9be0b9279035d06639' -- v0.26.0
end })

Helix, in languages.toml, then hx --grammar fetch && hx --grammar build:

[[grammar]]
name = "ruby"
source = { git = "https://github.com/Magikdidi24/tree-sitter-ruby", rev = "df14fbe651cb06eeec66ec9be0b9279035d06639" }

Emacs 30, then M-x treesit-install-language-grammar RET ruby:

(add-to-list 'treesit-language-source-alist
             '(ruby "https://github.com/Magikdidi24/tree-sitter-ruby" "v0.26.0"))

Development

The parser is generated for ABI 15, which tree-sitter 0.25 and newer runtimes read (Neovim 0.11, py-tree-sitter 0.25, node-tree-sitter 0.25, the Rust crate 0.25):

npm ci
node_modules/.bin/tree-sitter generate
node_modules/.bin/tree-sitter test

Older runtimes (Neovim 0.10, tree-sitter 0.22 to 0.24) need a parser for ABI 14: node_modules/.bin/tree-sitter generate --abi 14.

Deno can load grammar.js instead of Node, and lints it:

TREE_SITTER_JS_RUNTIME=deno node_modules/.bin/tree-sitter generate
deno lint

bundle exec ruby script/prism_diff.rb DIR compares the trees with Prism on the Ruby files in DIR. script/coverage.sh prints how much of the hand-written scanner the tests run, by line and by branch; the coverage badge shows it for master. The performance history shows the parse cost and the parser size of every release.

Local variables

Like Ruby, the parser reads x +1 as x + 1 when x is a local variable, and as the call x(+1) otherwise. The external scanner tracks assignments, parameters, for and rescue => variables, numbered parameters, variables bound by pattern matching (in [x], in {name:}, in {"name":}, v => x), and the scopes of blocks, methods, classes and modules.

References

Metadata

Release files for tree-sitter-ruby-magikdidi24 0.27.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tree-sitter-ruby-magikdidi24 0.27.0
File Size Uploaded Provenance Actions
tree_sitter_ruby_magikdidi24-0.27.0.tar.gz 508.8 kB With provenance Details for tree_sitter_ruby_magikdidi24-0.27.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for tree-sitter-ruby-magikdidi24 0.27.0
File Actions
tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-win_arm64.whl CPython 3.10 abi3 Windows ARM64 Details for tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-win_arm64.whl
tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-win_amd64.whl
tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details for tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-musllinux_1_2_x86_64.whl
tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details for tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-musllinux_1_2_aarch64.whl
tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details for tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 Details for tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-macosx_11_0_arm64.whl
tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-macosx_10_9_x86_64.whl CPython 3.10 abi3 macOS 10.9+ x86-64 Details for tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-macosx_10_9_x86_64.whl

Total release size: 2.4 MB

Release files / tree_sitter_ruby_magikdidi24-0.27.0.tar.gz

Download URL tree_sitter_ruby_magikdidi24-0.27.0.tar.gz
Size 508.8 kB
Tags Source
SHA-256 checksum
How to use checksums
eb338db0a0fc7ff008c9814e258c812ba2e91e4a16716229668ff0aaa08a3438
BLAKE2b-256 checksum
How to use checksums
bcc6f0e405b78e9bac1973091b13362900b591d5c07fa97b88d0d80d6461ef64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-win_arm64.whl

Download URL tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-win_arm64.whl
Size 190.6 kB
Tags CPython 3.10 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
d20dbf8cd675aaa73ffb1a560738d5846fde8d9a8e955de8baf7101226533a4d
BLAKE2b-256 checksum
How to use checksums
a1190a828dd657148281f6d0c7dbfbbf2fb3fb3a4997b835d0b3eb4b778d50f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-win_amd64.whl

Download URL tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-win_amd64.whl
Size 192.7 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
b9ac2040451594e9f96dfdc632e9000098eefeb6e4391b8fe05e835967c6f000
BLAKE2b-256 checksum
How to use checksums
644b58c16fa4b97485290a9c16bdbc5fcaeffd7ec2663851a39d2ce50946d2bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 265.7 kB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
efb7ad04d779e4002105dcf4bffaea86f6cfea3bd8c4218e949b4920f8eabbde
BLAKE2b-256 checksum
How to use checksums
3b80b32e4958f2820470b412eaa5ed7e0d757cf3ce04d8d093680d00d899e0c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 264.9 kB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
49bee4d32691fc602f8f4ee3608edc8dd55575761c3c9b4bdb0e6d849bced1c5
BLAKE2b-256 checksum
How to use checksums
fc35410fc462abf51335d1d23d230804d917a63ccadfb451bf73614e8f5f9a1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 267.2 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
d049da39485d702dd81fd97e13114a68da2497d5f52f64b46a75324ab5e533f8
BLAKE2b-256 checksum
How to use checksums
e052e1e6c575f140baa87fc296e82286ba0c5041dc31bf339c72764e8f45c285
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 267.3 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
10655cdf9ced3adadf06b1a2acb139308cad30d94b1cf2aa156f48a085becfb7
BLAKE2b-256 checksum
How to use checksums
0cd65340c11b87c86d82c478fd8d1e6c1480dd8b5316a8a8c2307327ed28275d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-macosx_11_0_arm64.whl
Size 206.5 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4d413a83e890ded581b58ee5c08e4318c24ed0165e7a910fb2c8dddd4f454a19
BLAKE2b-256 checksum
How to use checksums
8f3aa87d404074084d8e70942c2c7d322f9996af16e0d7c8d4b96601de9ecb90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-macosx_10_9_x86_64.whl

Download URL tree_sitter_ruby_magikdidi24-0.27.0-cp310-abi3-macosx_10_9_x86_64.whl
Size 190.2 kB
Tags CPython 3.10 abi3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
d023ebaf549d454991e8f8d694ff9153f9f4bd2196e8fb6159505f12f935fdc8
BLAKE2b-256 checksum
How to use checksums
dc1fc5642387d02bc6582a6c92d24ef6ed75d4b87d1ff7a9d1e9afd615e0d29f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for tree-sitter-ruby-magikdidi24 0.27.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 9 files in this release have been uploaded with provenance metadata.

Select from 9 files

Attestation for tree_sitter_ruby_magikdidi24-0.27.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page