Skip to main content

tree-sitter-ruby

CI release npm crates pypi coverage 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 = '9f675174553fc7f89ed656163d460d738b97828f' -- v0.25.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 = "9f675174553fc7f89ed656163d460d738b97828f" }

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.

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:}, v => x), and the scopes of blocks, methods, classes and modules. Only a string key in a hash pattern (in {"name":}) still declares nothing, so there name +1 stays a call.

References

Metadata

Release files for tree-sitter-ruby-magikdidi24 0.26.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.26.0
File Size Uploaded Provenance Actions
tree_sitter_ruby_magikdidi24-0.26.0.tar.gz 500.8 kB With provenance Details for tree_sitter_ruby_magikdidi24-0.26.0.tar.gz

Built distributions (wheels)

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

Total release size: 2.3 MB

Release files / tree_sitter_ruby_magikdidi24-0.26.0.tar.gz

Download URL tree_sitter_ruby_magikdidi24-0.26.0.tar.gz
Size 500.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e20b5161be1577e0e39a8f5e7bdc896a9475463cd6155cdabf5cd966c1ce0c61
BLAKE2b-256 checksum
How to use checksums
0d8f9155261a5f3edafc0cd790d3f6ff25af87fb3f29d83e9c38744b48d7047d
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.26.0-cp310-abi3-win_arm64.whl

Download URL tree_sitter_ruby_magikdidi24-0.26.0-cp310-abi3-win_arm64.whl
Size 187.4 kB
Tags CPython 3.10 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
4f8849f11480df4020c56373af07a699a794a0d38d68a91730d7653344d8fcd6
BLAKE2b-256 checksum
How to use checksums
e495e351882c4cbb62aabdf4b996d94888f0372a6bcd5b9348d4ab95437a5da3
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.26.0-cp310-abi3-win_amd64.whl

Download URL tree_sitter_ruby_magikdidi24-0.26.0-cp310-abi3-win_amd64.whl
Size 189.3 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
49d063683289ff32409f60bfc6c32918f247b23905ed35049d16d9ef3dd8f9fe
BLAKE2b-256 checksum
How to use checksums
78ff1235ce8f1c775f4c90d99bef73c2072126571e0d4082a7607980d4a092f7
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.26.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL tree_sitter_ruby_magikdidi24-0.26.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 258.6 kB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
ae11db430eeeb060777a9ef513979bf8700ce440a0a37901b28162aaa4df844e
BLAKE2b-256 checksum
How to use checksums
0b56177e5ae6c53e1421c93e6a9ce98d8da2bccf931600f557d7605d6c0c4523
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.26.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL tree_sitter_ruby_magikdidi24-0.26.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 257.9 kB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
1636a7412984db1bb3f7bd64b5f692ff75f84e8a12002e9d71f5601ed703eb8e
BLAKE2b-256 checksum
How to use checksums
a5da50b575751299d3e47b11263dfd9a98afeca9cf83177585b3f3d2edfb7c70
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.26.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL tree_sitter_ruby_magikdidi24-0.26.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 260.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
43c0e6ba4c3f18b0c7a0fb6d09320268701c9b690aecb7cd743883c7c386d8ae
BLAKE2b-256 checksum
How to use checksums
a57220f3e19d34aed0b06d64e688da8b906d9391feb5c0ffa501a8393bb29e15
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.26.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL tree_sitter_ruby_magikdidi24-0.26.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 260.4 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
ae60d04fdbbeb877d9c077f698fdb5a871c159eafd2a6ee170b954de613d727f
BLAKE2b-256 checksum
How to use checksums
bd6c8bfb33027d8d7ac0df42f2ac50cfc51498beb7d32d2d41f94dc978664c79
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.26.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL tree_sitter_ruby_magikdidi24-0.26.0-cp310-abi3-macosx_11_0_arm64.whl
Size 203.4 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8433e1f6b2b1407cd592391887f872d220c4832cbe1131d237d6213f169b3f7f
BLAKE2b-256 checksum
How to use checksums
6e489036a2d7726d0bfe36ec57161d9e0b3dbf978c1efd649ce44b3ec4d9f7d8
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.26.0-cp310-abi3-macosx_10_9_x86_64.whl

Download URL tree_sitter_ruby_magikdidi24-0.26.0-cp310-abi3-macosx_10_9_x86_64.whl
Size 187.6 kB
Tags CPython 3.10 abi3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
a931e13a7fad3805b38f04ffc1545e3a6bdecfb6b7b191f652c5f595a2d0f68c
BLAKE2b-256 checksum
How to use checksums
b1144cdef61cd1875e0498482bff694209962b1e0d1191de881d45b08ad58883
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.26.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.26.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