Skip to content

build(deps): bump ruby-prism from 1.9.0 to 2.0.0 - #191

Merged
moznion merged 3 commits into
mainfrom
dependabot/cargo/ruby-prism-2.0.0
Oct 28, 2026
Merged

moznion merged 3 commits into
mainfrom
dependabot/cargo/ruby-prism-2.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 27, 2026

Copy link
Copy Markdown
Contributor

Bumps ruby-prism from 1.9.0 to 2.0.0.

Release notes

Sourced from ruby-prism's releases.

v2.0.0

Highlights

  • Significant performance and memory usage improvements.
  • Precompiled platform-specific variants on rubygems.org.
  • Many documentation improvements, including a new playground.
  • Prism now ships accurate and complete RBS and RBI definitions.
  • The license is now owned by the Ruby developers.
  • Prism now ships an official C++ interface.

Added

  • Support for parsing Ruby 4.1 syntax:
    • Add support for &nil to declare that a method accepts no block.
    • Thoroughly implement void value expression check.
    • Allow trailing commas in method signatures like def foo(a,); end.
    • Reject END { break } and END { next }.
    • a /b/ no longer warns about ambiguous /.
  • version: "nearest" is now supported. It behaves similarly to version: "current" but will not raise when the version is unsupported, instead falling back to the nearest syntax version prism currently supports.
  • raise_error was added as a valid option. Prism will raise a SyntaxError when given syntax-invalid code. When true is given, prism decides the formatting (tty?, NO_COLOR, etc.). If you need a specific style, :plain, :style, and :color are also supported values.
  • Added Prism::ParseResult#continuable to check if the parsed source can become valid by appending more code.
  • Prism.find takes a Method, UnboundMethod, Proc, or Thread::Backtrace::Location and returns the associated prism AST node.
  • ForwardingSuperNode now has keyword_loc.
  • Allow pattern matching with prism nodes to match on location slices, like node in Prism::StringNode[content: "foo"].
  • Prism.parse_file and similar now accept anything responding to to_path (like Pathname) directly.
  • attach_comments was added as a valid option. Each comment is attached to the node that ends latest on the comment's line before it, otherwise to the innermost node that contains it (or to that node's statements, if only whitespace and comments come between the comment and the statements), otherwise to the top-level statements. The attached comments are available through Node#comments and through pm_node_comments_size and pm_node_comment in the C API, as well as pm_parser_comment_attachment, pm_parser_comment_ranges_size, and pm_parser_comment_range, which expose the attachments grouped by node. When the option is set, the comments on the parse result are sorted by start offset.
  • StringQuery#keyword? was added to check if the string query matches a keyword.
  • Source#checksum was added to retrieve the checksum of the source content.

Changed

Note that for this major version, almost every change listed below is breaking.

  • Prism now defaults to version: "nearest" instead of version: "latest", so code is parsed with the syntax of the running Ruby (or the closest version prism supports). Pass version: "latest" to keep the previous behavior.
  • MissingNode has been replaced by ErrorRecoveryNode. ErrorRecoveryNode wraps unexpected nodes, so when walking syntax-invalid code you will now only need to handle this one specific node type.
  • Some fields were renamed for consistency. Previous names are aliased and will continue to work in the Ruby layer.
    • InNode#{in,then}_loc -> InNode#{in,then}_keyword_loc
    • MatchPredicateNode#operator_loc -> MatchPredicateNode#keyword_loc
    • UnlessNode#keyword_loc -> UnlessNode#unless_keyword_loc
    • UntilNode#{keyword,closing}_loc -> UntilNode#{until,end}_keyword_loc
    • WhenNode#keyword_loc -> WhenNode#when_keyword_loc
    • WhileNode#{keyword,closing}_loc -> WhileNode#{while,end}_keyword_loc
  • Optional locations like StringNode#closing_loc in 'foo that were empty for syntax-invalid code will now be nil instead.
  • Prism.lex now returns an array of tokens instead of an array of [token, internal_parse_state]. Previous access like token[0] or token.first to extract the actual token will continue to work. Additionally the following tokens were changed:
    • PARENTHESIS_LEFT was split up into PARENTHESIS_LEFT and PARENTHESIS_LEFT_GROUPING.
    • BRACE_LEFT was split up into BRACE_LEFT, BRACE_LEFT_ARGUMENT, and BRACE_LEFT_HASH.
    • BACKTICK was split up into BACKTICK and XSTRING_BACKTICK.
    • NEWLINE was split up into NEWLINE and NEWLINE_TERMINATOR.
    • WORDS_SEP was split up into WORDS_SEP and WORDS_SEP_IMPLICIT.

... (truncated)

Changelog

Sourced from ruby-prism's changelog.

[2.0.0] - 2026-10-21

Highlights

  • Significant performance and memory usage improvements.
  • Precompiled platform-specific variants on rubygems.org.
  • Many documentation improvements, including a new playground.
  • Prism now ships accurate and complete RBS and RBI definitions.
  • The license is now owned by the Ruby developers.
  • Prism now ships an official C++ interface.

Added

  • Support for parsing Ruby 4.1 syntax:
    • Add support for &nil to declare that a method accepts no block.
    • Thoroughly implement void value expression check.
    • Allow trailing commas in method signatures like def foo(a,); end.
    • Reject END { break } and END { next }.
    • a /b/ no longer warns about ambiguous /.
  • version: "nearest" is now supported. It behaves similarly to version: "current" but will not raise when the version is unsupported, instead falling back to the nearest syntax version prism currently supports.
  • raise_error was added as a valid option. Prism will raise a SyntaxError when given syntax-invalid code. When true is given, prism decides the formatting (tty?, NO_COLOR, etc.). If you need a specific style, :plain, :style, and :color are also supported values.
  • Added Prism::ParseResult#continuable to check if the parsed source can become valid by appending more code.
  • Prism.find takes a Method, UnboundMethod, Proc, or Thread::Backtrace::Location and returns the associated prism AST node.
  • ForwardingSuperNode now has keyword_loc.
  • Allow pattern matching with prism nodes to match on location slices, like node in Prism::StringNode[content: "foo"].
  • Prism.parse_file and similar now accept anything responding to to_path (like Pathname) directly.
  • attach_comments was added as a valid option. Each comment is attached to the node that ends latest on the comment's line before it, otherwise to the innermost node that contains it (or to that node's statements, if only whitespace and comments come between the comment and the statements), otherwise to the top-level statements. The attached comments are available through Node#comments and through pm_node_comments_size and pm_node_comment in the C API, as well as pm_parser_comment_attachment, pm_parser_comment_ranges_size, and pm_parser_comment_range, which expose the attachments grouped by node. When the option is set, the comments on the parse result are sorted by start offset.
  • StringQuery#keyword? was added to check if the string query matches a keyword.
  • Source#checksum was added to retrieve the checksum of the source content.

Changed

Note that for this major version, almost every change listed below is breaking.

  • Prism now defaults to version: "nearest" instead of version: "latest", so code is parsed with the syntax of the running Ruby (or the closest version prism supports). Pass version: "latest" to keep the previous behavior.
  • MissingNode has been replaced by ErrorRecoveryNode. ErrorRecoveryNode wraps unexpected nodes, so when walking syntax-invalid code you will now only need to handle this one specific node type.
  • Some fields were renamed for consistency. Previous names are aliased and will continue to work in the Ruby layer.
    • InNode#{in,then}_loc -> InNode#{in,then}_keyword_loc
    • MatchPredicateNode#operator_loc -> MatchPredicateNode#keyword_loc
    • UnlessNode#keyword_loc -> UnlessNode#unless_keyword_loc
    • UntilNode#{keyword,closing}_loc -> UntilNode#{until,end}_keyword_loc
    • WhenNode#keyword_loc -> WhenNode#when_keyword_loc
    • WhileNode#{keyword,closing}_loc -> WhileNode#{while,end}_keyword_loc
  • Optional locations like StringNode#closing_loc in 'foo that were empty for syntax-invalid code will now be nil instead.
  • Prism.lex now returns an array of tokens instead of an array of [token, internal_parse_state]. Previous access like token[0] or token.first to extract the actual token will continue to work. Additionally the following tokens were changed:
    • PARENTHESIS_LEFT was split up into PARENTHESIS_LEFT and PARENTHESIS_LEFT_GROUPING.
    • BRACE_LEFT was split up into BRACE_LEFT, BRACE_LEFT_ARGUMENT, and BRACE_LEFT_HASH.
    • BACKTICK was split up into BACKTICK and XSTRING_BACKTICK.
    • NEWLINE was split up into NEWLINE and NEWLINE_TERMINATOR.
    • WORDS_SEP was split up into WORDS_SEP and WORDS_SEP_IMPLICIT.

... (truncated)

Commits
  • e272736 Bump to v2.0.0
  • 57b8dbe Ship an official C++ interface
  • bda3cff Use slice!(-n,n) instead of pop(n) to fix ractors
  • 8adb155 Fix cygwin
  • ab92f0e Serialize using post-order traversal
  • 72da479 Fix printf format attribute on ucrt64-mingw gcc 16.3
  • 4896c9f Expose pm_node_list_append and pm_parser_constant_insert
  • ba48773 Make strings just a view into memory
  • dd8b706 Avoid allocating when comparing magic comments
  • 770e381 Default options start line to 1
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [ruby-prism](https://github.com/ruby/prism) from 1.9.0 to 2.0.0.
- [Release notes](https://github.com/ruby/prism/releases)
- [Changelog](https://github.com/ruby/prism/blob/main/CHANGELOG.md)
- [Commits](ruby/prism@v1.9.0...v2.0.0)

---
updated-dependencies:
- dependency-name: ruby-prism
  dependency-version: 2.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Oct 27, 2026
@github-actions

This comment has been minimized.

Diagnostic::message() now returns &[u8] and Location::start_offset() was
renamed to start() returning u32.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Code Complexity (src)

main (de4e988) #191 (e3e9d86) +/-
Function count 2980 2980 0
Cognitive: total 3485 3485 0
Cognitive: max 63 63 0
Cognitive: median 0 0 0
Cognitive: p90 3 3 0
Cyclomatic: total 6034 6034 0
Cyclomatic: max 52 52 0
Cyclomatic: median 1 1 0
Cyclomatic: p90 4 4 0

Reported by octocov

@github-actions

Copy link
Copy Markdown
Contributor

Code Metrics Report

main (de4e988) #191 (e3e9d86) +/-
Coverage 95.0% 95.0% +0.0%
Test Execution Time 24s 15s -9s
Details
  |                     | main (de4e988) | #191 (e3e9d86) |  +/-  |
  |---------------------|----------------|----------------|-------|
+ | Coverage            |          95.0% |          95.0% | +0.0% |
  |   Files             |             36 |             36 |     0 |
  |   Lines             |          16832 |          16835 |    +3 |
+ |   Covered           |          15999 |          16002 |    +3 |
+ | Test Execution Time |            24s |            15s |   -9s |

Code coverage of files in pull request scope (93.9% → 93.9%, patch 87.5%)

Files Coverage +/- Patch Coverage Status
crates/cccc-rb/src/lib.rs 93.9% +0.0% 87.5% modified

Reported by octocov

@moznion
moznion merged commit 2bfcb28 into main Oct 28, 2026
33 checks passed
@moznion
moznion deleted the dependabot/cargo/ruby-prism-2.0.0 branch October 28, 2026 02:38
@github-actions github-actions Bot mentioned this pull request Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant