From 674ffbbc584fa2e60f9c7009583f44f10f2a9867 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Fri, 27 Feb 2026 11:51:22 +0100 Subject: [PATCH 1/5] Fix error message for block/lambda with `...` argument They currently complain that the parent method is not forwarding. But the actual problem is that these types of arguments simply don't accept `...` Fixes [Bug #21927] --- config.yml | 2 ++ src/prism.c | 28 +++++++++++++++++-- templates/src/diagnostic.c.erb | 2 ++ ..._not_allow_forward_arguments_in_blocks.txt | 12 +++++++- ...w_forward_arguments_in_lambda_literals.txt | 12 +++++++- 5 files changed, 51 insertions(+), 5 deletions(-) diff --git a/config.yml b/config.yml index ed5c9d8b9c..36b5aa2095 100644 --- a/config.yml +++ b/config.yml @@ -17,6 +17,8 @@ errors: - ARGUMENT_FORWARDING_UNBOUND - ARGUMENT_NO_FORWARDING_AMPERSAND - ARGUMENT_NO_FORWARDING_ELLIPSES + - ARGUMENT_NO_FORWARDING_ELLIPSES_LAMBDA + - ARGUMENT_NO_FORWARDING_ELLIPSES_BLOCK - ARGUMENT_NO_FORWARDING_STAR - ARGUMENT_NO_FORWARDING_STAR_STAR - ARGUMENT_SPLAT_AFTER_ASSOC_SPLAT diff --git a/src/prism.c b/src/prism.c index cc1896ee34..29c1f1c0de 100644 --- a/src/prism.c +++ b/src/prism.c @@ -14636,6 +14636,7 @@ parse_parameters( bool allows_forwarding_parameters, bool accepts_blocks_in_defaults, bool in_block, + pm_diagnostic_id_t diag_id_forwarding, uint16_t depth ) { pm_do_loop_stack_push(parser, false); @@ -14695,7 +14696,7 @@ parse_parameters( } case PM_TOKEN_UDOT_DOT_DOT: { if (!allows_forwarding_parameters) { - pm_parser_err_current(parser, PM_ERR_ARGUMENT_NO_FORWARDING_ELLIPSES); + pm_parser_err_current(parser, diag_id_forwarding); } bool succeeded = update_parameter_state(parser, &parser->current, &order); @@ -15388,6 +15389,7 @@ parse_block_parameters( false, accepts_blocks_in_defaults, true, + is_lambda_literal ? PM_ERR_ARGUMENT_NO_FORWARDING_ELLIPSES_LAMBDA : PM_ERR_ARGUMENT_NO_FORWARDING_ELLIPSES_BLOCK, (uint16_t) (depth + 1) ); } @@ -19585,7 +19587,17 @@ parse_expression_prefix(pm_parser_t *parser, pm_binding_power_t binding_power, b if (match1(parser, PM_TOKEN_PARENTHESIS_RIGHT)) { params = NULL; } else { - params = parse_parameters(parser, PM_BINDING_POWER_DEFINED, true, false, true, true, false, (uint16_t) (depth + 1)); + params = parse_parameters( + parser, + PM_BINDING_POWER_DEFINED, + true, + false, + true, + true, + false, + PM_ERR_ARGUMENT_NO_FORWARDING_ELLIPSES, + (uint16_t) (depth + 1) + ); } lex_state_set(parser, PM_LEX_STATE_BEG); @@ -19610,7 +19622,17 @@ parse_expression_prefix(pm_parser_t *parser, pm_binding_power_t binding_power, b lparen = not_provided(parser); rparen = not_provided(parser); - params = parse_parameters(parser, PM_BINDING_POWER_DEFINED, false, false, true, true, false, (uint16_t) (depth + 1)); + params = parse_parameters( + parser, + PM_BINDING_POWER_DEFINED, + false, + false, + true, + true, + false, + PM_ERR_ARGUMENT_NO_FORWARDING_ELLIPSES, + (uint16_t) (depth + 1) + ); context_pop(parser); break; diff --git a/templates/src/diagnostic.c.erb b/templates/src/diagnostic.c.erb index 2373253085..392fd29cff 100644 --- a/templates/src/diagnostic.c.erb +++ b/templates/src/diagnostic.c.erb @@ -102,6 +102,8 @@ static const pm_diagnostic_data_t diagnostic_messages[PM_DIAGNOSTIC_ID_MAX] = { [PM_ERR_ARGUMENT_FORWARDING_UNBOUND] = { "unexpected `...` in an non-parenthesized call", PM_ERROR_LEVEL_SYNTAX }, [PM_ERR_ARGUMENT_NO_FORWARDING_AMPERSAND] = { "unexpected `&`; no anonymous block parameter", PM_ERROR_LEVEL_SYNTAX }, [PM_ERR_ARGUMENT_NO_FORWARDING_ELLIPSES] = { "unexpected ... when the parent method is not forwarding", PM_ERROR_LEVEL_SYNTAX }, + [PM_ERR_ARGUMENT_NO_FORWARDING_ELLIPSES_LAMBDA] = { "unexpected ... in lambda argument", PM_ERROR_LEVEL_SYNTAX }, + [PM_ERR_ARGUMENT_NO_FORWARDING_ELLIPSES_BLOCK] = { "unexpected ... in block argument", PM_ERROR_LEVEL_SYNTAX }, [PM_ERR_ARGUMENT_NO_FORWARDING_STAR] = { "unexpected `*`; no anonymous rest parameter", PM_ERROR_LEVEL_SYNTAX }, [PM_ERR_ARGUMENT_NO_FORWARDING_STAR_STAR] = { "unexpected `**`; no anonymous keyword rest parameter", PM_ERROR_LEVEL_SYNTAX }, [PM_ERR_ARGUMENT_SPLAT_AFTER_ASSOC_SPLAT] = { "unexpected `*` splat argument after a `**` keyword splat argument", PM_ERROR_LEVEL_SYNTAX }, diff --git a/test/prism/errors/do_not_allow_forward_arguments_in_blocks.txt b/test/prism/errors/do_not_allow_forward_arguments_in_blocks.txt index df49557617..639dec3af2 100644 --- a/test/prism/errors/do_not_allow_forward_arguments_in_blocks.txt +++ b/test/prism/errors/do_not_allow_forward_arguments_in_blocks.txt @@ -1,3 +1,13 @@ a {|...|} - ^~~ unexpected ... when the parent method is not forwarding + ^~~ unexpected ... in block argument + +def foo(...) + a {|...|} + ^~~ unexpected ... in block argument +end + +def foo + a {|...|} + ^~~ unexpected ... in block argument +end diff --git a/test/prism/errors/do_not_allow_forward_arguments_in_lambda_literals.txt b/test/prism/errors/do_not_allow_forward_arguments_in_lambda_literals.txt index c2405a5c66..03e17683e4 100644 --- a/test/prism/errors/do_not_allow_forward_arguments_in_lambda_literals.txt +++ b/test/prism/errors/do_not_allow_forward_arguments_in_lambda_literals.txt @@ -1,3 +1,13 @@ ->(...) {} - ^~~ unexpected ... when the parent method is not forwarding + ^~~ unexpected ... in lambda argument + +def foo(...) + ->(...) {} + ^~~ unexpected ... in lambda argument +end + +def foo + ->(...) {} + ^~~ unexpected ... in lambda argument +end From ff334c461c2e59657825beb170544da2e35b47e7 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Mon, 2 Mar 2026 11:49:29 -0500 Subject: [PATCH 2/5] Fix in handling in is a unique keyword because it can be the start of a clause or an infix keyword. We need to be explicitly sure that even though in _could_ close an expression context (the body of another in clause) that we are not also parsing an inline in. The exception is the case of a command call, which can never be the LHS of an expression, and so we must immediately exit. [Bug #21925] [Bug #21674] --- snapshots/case_in_in.txt | 78 ++++++++++++++++++++++++++++++ src/prism.c | 17 ++++--- test/prism/fixtures/case_in_in.txt | 4 ++ 3 files changed, 93 insertions(+), 6 deletions(-) create mode 100644 snapshots/case_in_in.txt create mode 100644 test/prism/fixtures/case_in_in.txt diff --git a/snapshots/case_in_in.txt b/snapshots/case_in_in.txt new file mode 100644 index 0000000000..3464b95fba --- /dev/null +++ b/snapshots/case_in_in.txt @@ -0,0 +1,78 @@ +@ ProgramNode (location: (1,0)-(4,3)) +├── flags: ∅ +├── locals: [:event] +└── statements: + @ StatementsNode (location: (1,0)-(4,3)) + ├── flags: ∅ + └── body: (length: 1) + └── @ CaseMatchNode (location: (1,0)-(4,3)) + ├── flags: newline + ├── predicate: + │ @ CallNode (location: (1,5)-(1,9)) + │ ├── flags: variable_call, ignore_visibility + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :args + │ ├── message_loc: (1,5)-(1,9) = "args" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ + ├── conditions: (length: 1) + │ └── @ InNode (location: (2,0)-(3,25)) + │ ├── flags: ∅ + │ ├── pattern: + │ │ @ ArrayPatternNode (location: (2,3)-(2,10)) + │ │ ├── flags: ∅ + │ │ ├── constant: ∅ + │ │ ├── requireds: (length: 1) + │ │ │ └── @ LocalVariableTargetNode (location: (2,4)-(2,9)) + │ │ │ ├── flags: ∅ + │ │ │ ├── name: :event + │ │ │ └── depth: 0 + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── opening_loc: (2,3)-(2,4) = "[" + │ │ └── closing_loc: (2,9)-(2,10) = "]" + │ ├── statements: + │ │ @ StatementsNode (location: (3,2)-(3,25)) + │ │ ├── flags: ∅ + │ │ └── body: (length: 1) + │ │ └── @ MatchPredicateNode (location: (3,2)-(3,25)) + │ │ ├── flags: newline + │ │ ├── value: + │ │ │ @ CallNode (location: (3,2)-(3,15)) + │ │ │ ├── flags: ∅ + │ │ │ ├── receiver: + │ │ │ │ @ CallNode (location: (3,2)-(3,9)) + │ │ │ │ ├── flags: variable_call, ignore_visibility + │ │ │ │ ├── receiver: ∅ + │ │ │ │ ├── call_operator_loc: ∅ + │ │ │ │ ├── name: :context + │ │ │ │ ├── message_loc: (3,2)-(3,9) = "context" + │ │ │ │ ├── opening_loc: ∅ + │ │ │ │ ├── arguments: ∅ + │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ └── block: ∅ + │ │ │ ├── call_operator_loc: (3,9)-(3,10) = "." + │ │ │ ├── name: :event + │ │ │ ├── message_loc: (3,10)-(3,15) = "event" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ ├── pattern: + │ │ │ @ PinnedVariableNode (location: (3,19)-(3,25)) + │ │ │ ├── flags: ∅ + │ │ │ ├── variable: + │ │ │ │ @ LocalVariableReadNode (location: (3,20)-(3,25)) + │ │ │ │ ├── flags: ∅ + │ │ │ │ ├── name: :event + │ │ │ │ └── depth: 0 + │ │ │ └── operator_loc: (3,19)-(3,20) = "^" + │ │ └── operator_loc: (3,16)-(3,18) = "in" + │ ├── in_loc: (2,0)-(2,2) = "in" + │ └── then_loc: ∅ + ├── else_clause: ∅ + ├── case_keyword_loc: (1,0)-(1,4) = "case" + └── end_keyword_loc: (4,0)-(4,3) = "end" diff --git a/src/prism.c b/src/prism.c index 29c1f1c0de..6e7ae227ec 100644 --- a/src/prism.c +++ b/src/prism.c @@ -22339,12 +22339,6 @@ parse_expression(pm_parser_t *parser, pm_binding_power_t binding_power, bool acc ) { node = parse_expression_infix(parser, node, binding_power, current_binding_powers.right, accepts_command_call, (uint16_t) (depth + 1)); - if (context_terminator(parser->current_context->context, &parser->current)) { - // If this token terminates the current context, then we need to - // stop parsing the expression, as it has become a statement. - return node; - } - switch (PM_NODE_TYPE(node)) { case PM_MULTI_WRITE_NODE: // Multi-write nodes are statements, and cannot be followed by @@ -22457,6 +22451,17 @@ parse_expression(pm_parser_t *parser, pm_binding_power_t binding_power, bool acc break; } } + + if (context_terminator(parser->current_context->context, &parser->current)) { + pm_binding_powers_t next_binding_powers = pm_binding_powers[parser->current.type]; + if ( + !next_binding_powers.binary || + binding_power > next_binding_powers.left || + (PM_NODE_TYPE_P(node, PM_CALL_NODE) && pm_call_node_command_p((pm_call_node_t *) node)) + ) { + return node; + } + } } return node; diff --git a/test/prism/fixtures/case_in_in.txt b/test/prism/fixtures/case_in_in.txt new file mode 100644 index 0000000000..a5f9e4ec41 --- /dev/null +++ b/test/prism/fixtures/case_in_in.txt @@ -0,0 +1,4 @@ +case args +in [event] + context.event in ^event +end From af9c6aaeec781c98beb35132af4eb592ecc08c8c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 11 Jan 2026 22:46:06 +0900 Subject: [PATCH 3/5] [Bug #21831] Fix denominator of rational float literal Denominators can contain underscores in fraction part as well as other numeric literals. [Bug #21831]: https://bugs.ruby-lang.org/issues/21831 --- src/prism.c | 8 ++++++-- test/prism/result/numeric_value_test.rb | 11 +++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/prism.c b/src/prism.c index 6e7ae227ec..332bbbc4d7 100644 --- a/src/prism.c +++ b/src/prism.c @@ -4264,9 +4264,13 @@ pm_float_node_rational_create(pm_parser_t *parser, const pm_token_t *token) { memcpy(digits + (point - start), point + 1, (unsigned long) (end - point - 1)); pm_integer_parse(&node->numerator, PM_INTEGER_BASE_DEFAULT, digits, digits + length - 1); + size_t fract_length = 0; + for (const uint8_t *fract = point; fract < end; ++fract) { + if (*fract != '_') ++fract_length; + } digits[0] = '1'; - if (end - point > 1) memset(digits + 1, '0', (size_t) (end - point - 1)); - pm_integer_parse(&node->denominator, PM_INTEGER_BASE_DEFAULT, digits, digits + (end - point)); + if (fract_length > 1) memset(digits + 1, '0', fract_length - 1); + pm_integer_parse(&node->denominator, PM_INTEGER_BASE_DEFAULT, digits, digits + fract_length); xfree(digits); pm_integers_reduce(&node->numerator, &node->denominator); diff --git a/test/prism/result/numeric_value_test.rb b/test/prism/result/numeric_value_test.rb index 5c89230a1f..0207fa6a86 100644 --- a/test/prism/result/numeric_value_test.rb +++ b/test/prism/result/numeric_value_test.rb @@ -6,16 +6,27 @@ module Prism class NumericValueTest < TestCase def test_numeric_value assert_equal 123, Prism.parse_statement("123").value + assert_equal 123, Prism.parse_statement("1_23").value assert_equal 3.14, Prism.parse_statement("3.14").value + assert_equal 3.14, Prism.parse_statement("3.1_4").value assert_equal 42i, Prism.parse_statement("42i").value + assert_equal 42i, Prism.parse_statement("4_2i").value assert_equal 42.1ri, Prism.parse_statement("42.1ri").value + assert_equal 42.1ri, Prism.parse_statement("42.1_0ri").value assert_equal 3.14i, Prism.parse_statement("3.14i").value + assert_equal 3.14i, Prism.parse_statement("3.1_4i").value assert_equal 42r, Prism.parse_statement("42r").value + assert_equal 42r, Prism.parse_statement("4_2r").value assert_equal 0.5r, Prism.parse_statement("0.5r").value + assert_equal 0.5r, Prism.parse_statement("0.5_0r").value assert_equal 42ri, Prism.parse_statement("42ri").value + assert_equal 42ri, Prism.parse_statement("4_2ri").value assert_equal 0.5ri, Prism.parse_statement("0.5ri").value + assert_equal 0.5ri, Prism.parse_statement("0.5_0ri").value assert_equal 0xFFr, Prism.parse_statement("0xFFr").value + assert_equal 0xFFr, Prism.parse_statement("0xF_Fr").value assert_equal 0xFFri, Prism.parse_statement("0xFFri").value + assert_equal 0xFFri, Prism.parse_statement("0xF_Fri").value end end end From 4ccad931a6a882b58cecaea03ede7ce383048b0a Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Sun, 14 Jun 2026 17:12:49 +0200 Subject: [PATCH 4/5] Fix CI * Ruby head is now ruby 4.0 * `ruby_parser`/`sexp_processor` disallow ruby 4.0, bump them * Relax truffleruby/jruby constraint * Bump bundler for ruby-head * disable current ruby test for the `parser` gem * pin rust * run cruby tests against the correct branch --- .github/workflows/cruby-bindings.yml | 1 + .github/workflows/rust-bindings.yml | 4 ++-- Gemfile.lock | 6 +++--- gemfiles/3.5/Gemfile | 2 +- gemfiles/3.5/Gemfile.lock | 4 ++-- gemfiles/jruby/Gemfile | 2 +- gemfiles/truffleruby/Gemfile | 2 +- rust/ruby-prism/build.rs | 6 +++--- test/prism/ruby/parser_test.rb | 2 +- 9 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cruby-bindings.yml b/.github/workflows/cruby-bindings.yml index 1312293c32..1401f319f6 100644 --- a/.github/workflows/cruby-bindings.yml +++ b/.github/workflows/cruby-bindings.yml @@ -23,6 +23,7 @@ jobs: with: repository: ruby/ruby path: ruby/ruby + ref: ruby_3_4 fetch-depth: 1 - name: Install libraries run: | diff --git a/.github/workflows/rust-bindings.yml b/.github/workflows/rust-bindings.yml index 111fd0773e..8be23b914d 100644 --- a/.github/workflows/rust-bindings.yml +++ b/.github/workflows/rust-bindings.yml @@ -33,7 +33,7 @@ jobs: - name: Set up Rust uses: dtolnay/rust-toolchain@master with: - toolchain: stable + toolchain: "1.91.1" targets: wasm32-wasip1 - uses: actions/cache@v4 with: @@ -67,7 +67,7 @@ jobs: - name: Set up Rust uses: dtolnay/rust-toolchain@master with: - toolchain: stable + toolchain: "1.91.1" components: clippy, rustfmt - uses: actions/cache@v4 with: diff --git a/Gemfile.lock b/Gemfile.lock index fd87e1034e..199137c4ee 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -33,10 +33,10 @@ GEM tsort ruby_memcheck (3.0.1) nokogiri - ruby_parser (3.21.1) + ruby_parser (3.22.0) racc (~> 1.5) sexp_processor (~> 4.16) - sexp_processor (4.17.4) + sexp_processor (4.17.5) stringio (3.1.7) test-unit (3.7.0) power_assert @@ -59,4 +59,4 @@ DEPENDENCIES test-unit BUNDLED WITH - 2.5.16 + 4.0.14 diff --git a/gemfiles/3.5/Gemfile b/gemfiles/3.5/Gemfile index af835826a1..85fde92128 100644 --- a/gemfiles/3.5/Gemfile +++ b/gemfiles/3.5/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -ruby "~> 3.5.0.dev" +ruby ">= 3.5.0.dev" gemspec path: "../.." diff --git a/gemfiles/3.5/Gemfile.lock b/gemfiles/3.5/Gemfile.lock index b239919e13..7d3c8643d1 100644 --- a/gemfiles/3.5/Gemfile.lock +++ b/gemfiles/3.5/Gemfile.lock @@ -26,10 +26,10 @@ GEM logger ruby_memcheck (3.0.1) nokogiri - ruby_parser (3.21.1) + ruby_parser (3.22.0) racc (~> 1.5) sexp_processor (~> 4.16) - sexp_processor (4.17.4) + sexp_processor (4.17.5) test-unit (3.7.0) power_assert diff --git a/gemfiles/jruby/Gemfile b/gemfiles/jruby/Gemfile index 957c4c01d9..6ff39de574 100644 --- a/gemfiles/jruby/Gemfile +++ b/gemfiles/jruby/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -ruby "~> 3.4.2", engine: "jruby", engine_version: "~> 10.0.0" +ruby ">= 3.4.2", engine: "jruby", engine_version: ">= 10.0.0" gemspec path: "../.." diff --git a/gemfiles/truffleruby/Gemfile b/gemfiles/truffleruby/Gemfile index ce1282eacb..58a9c9822c 100644 --- a/gemfiles/truffleruby/Gemfile +++ b/gemfiles/truffleruby/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -ruby "~> 3.3.7", engine: "truffleruby", engine_version: "~> 25.0.0" +ruby ">= 3.3.7", engine: "truffleruby", engine_version: ">= 25.0.0" gemspec path: "../.." diff --git a/rust/ruby-prism/build.rs b/rust/ruby-prism/build.rs index e1dd0b4271..f8b8f94b96 100644 --- a/rust/ruby-prism/build.rs +++ b/rust/ruby-prism/build.rs @@ -142,10 +142,10 @@ fn struct_name(name: &str) -> String { result } -fn kind_to_type(kind: &String) -> String { - match kind.as_str() { +fn kind_to_type(kind: &str) -> String { + match kind { "non-void expression" | "pattern expression" | "Node" => String::new(), - _ => kind.to_string(), + _ => kind.to_owned(), } } diff --git a/test/prism/ruby/parser_test.rb b/test/prism/ruby/parser_test.rb index 10b5fca5ea..3e4276055b 100644 --- a/test/prism/ruby/parser_test.rb +++ b/test/prism/ruby/parser_test.rb @@ -163,7 +163,7 @@ def test_non_prism_builder_class_deprecated assert_empty(warnings) end - if RUBY_VERSION >= "3.3" + if RUBY_VERSION >= "3.3" && RUBY_VERSION < "4.0" def test_current_parser_for_current_ruby major, minor, _patch = Gem::Version.new(RUBY_VERSION).segments # Let's just hope there never is a Ruby 3.10 or similar From 5b0dcc6e63bd35d70e43eae58b3cc6debe80544a Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Mon, 15 Jun 2026 10:26:42 +0200 Subject: [PATCH 5/5] Bump to v1.5.3 --- Gemfile.lock | 2 +- ext/prism/extension.h | 2 +- gemfiles/2.7/Gemfile.lock | 2 +- gemfiles/3.0/Gemfile.lock | 2 +- gemfiles/3.1/Gemfile.lock | 2 +- gemfiles/3.2/Gemfile.lock | 2 +- gemfiles/3.3/Gemfile.lock | 2 +- gemfiles/3.4/Gemfile.lock | 2 +- gemfiles/3.5/Gemfile.lock | 2 +- gemfiles/jruby/Gemfile.lock | 2 +- gemfiles/truffleruby/Gemfile.lock | 2 +- include/prism/version.h | 4 ++-- javascript/package.json | 2 +- prism.gemspec | 2 +- rust/Cargo.lock | 4 ++-- rust/ruby-prism-sys/Cargo.toml | 2 +- rust/ruby-prism-sys/tests/utils_tests.rs | 2 +- rust/ruby-prism/Cargo.toml | 4 ++-- templates/java/org/prism/Loader.java.erb | 2 +- templates/javascript/src/deserialize.js.erb | 2 +- templates/lib/prism/serialize.rb.erb | 2 +- 21 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 199137c4ee..854cb0259c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - prism (1.5.2) + prism (1.5.3) GEM remote: https://rubygems.org/ diff --git a/ext/prism/extension.h b/ext/prism/extension.h index 1f15b775ff..47f2618020 100644 --- a/ext/prism/extension.h +++ b/ext/prism/extension.h @@ -1,7 +1,7 @@ #ifndef PRISM_EXT_NODE_H #define PRISM_EXT_NODE_H -#define EXPECTED_PRISM_VERSION "1.5.2" +#define EXPECTED_PRISM_VERSION "1.5.3" #include #include diff --git a/gemfiles/2.7/Gemfile.lock b/gemfiles/2.7/Gemfile.lock index ec55ee7fd6..3bfa69d409 100644 --- a/gemfiles/2.7/Gemfile.lock +++ b/gemfiles/2.7/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.5.3) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.0/Gemfile.lock b/gemfiles/3.0/Gemfile.lock index 6931a2ae25..910852ab34 100644 --- a/gemfiles/3.0/Gemfile.lock +++ b/gemfiles/3.0/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.5.3) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.1/Gemfile.lock b/gemfiles/3.1/Gemfile.lock index 89c201eb62..4610a18e8e 100644 --- a/gemfiles/3.1/Gemfile.lock +++ b/gemfiles/3.1/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.5.3) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.2/Gemfile.lock b/gemfiles/3.2/Gemfile.lock index 5dc9eef55b..ee963853dd 100644 --- a/gemfiles/3.2/Gemfile.lock +++ b/gemfiles/3.2/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.5.3) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.3/Gemfile.lock b/gemfiles/3.3/Gemfile.lock index 4d0316184d..20d5d3f73e 100644 --- a/gemfiles/3.3/Gemfile.lock +++ b/gemfiles/3.3/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.5.3) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.4/Gemfile.lock b/gemfiles/3.4/Gemfile.lock index 0c062f7708..1f1348b402 100644 --- a/gemfiles/3.4/Gemfile.lock +++ b/gemfiles/3.4/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.5.3) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.5/Gemfile.lock b/gemfiles/3.5/Gemfile.lock index 7d3c8643d1..fb58352ae0 100644 --- a/gemfiles/3.5/Gemfile.lock +++ b/gemfiles/3.5/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.5.3) GEM remote: https://rubygems.org/ diff --git a/gemfiles/jruby/Gemfile.lock b/gemfiles/jruby/Gemfile.lock index 31d22f163f..13fb5e442b 100644 --- a/gemfiles/jruby/Gemfile.lock +++ b/gemfiles/jruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.5.3) GEM remote: https://rubygems.org/ diff --git a/gemfiles/truffleruby/Gemfile.lock b/gemfiles/truffleruby/Gemfile.lock index a9c0f1a057..f720575d20 100644 --- a/gemfiles/truffleruby/Gemfile.lock +++ b/gemfiles/truffleruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.5.2) + prism (1.5.3) GEM remote: https://rubygems.org/ diff --git a/include/prism/version.h b/include/prism/version.h index c0d82dc8e2..bf6a117a1e 100644 --- a/include/prism/version.h +++ b/include/prism/version.h @@ -19,11 +19,11 @@ /** * The patch version of the Prism library as an int. */ -#define PRISM_VERSION_PATCH 2 +#define PRISM_VERSION_PATCH 3 /** * The version of the Prism library as a constant string. */ -#define PRISM_VERSION "1.5.2" +#define PRISM_VERSION "1.5.3" #endif diff --git a/javascript/package.json b/javascript/package.json index 43a9553852..a2759aa829 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,6 +1,6 @@ { "name": "@ruby/prism", - "version": "1.5.2", + "version": "1.5.3", "description": "Prism Ruby parser", "type": "module", "main": "src/index.js", diff --git a/prism.gemspec b/prism.gemspec index 8f6075ad96..4a391a6938 100644 --- a/prism.gemspec +++ b/prism.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "prism" - spec.version = "1.5.2" + spec.version = "1.5.3" spec.authors = ["Shopify"] spec.email = ["ruby@shopify.com"] diff --git a/rust/Cargo.lock b/rust/Cargo.lock index a3f8b92980..b28fd7094a 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -224,7 +224,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "ruby-prism" -version = "1.5.2" +version = "1.5.3" dependencies = [ "ruby-prism-sys", "serde", @@ -233,7 +233,7 @@ dependencies = [ [[package]] name = "ruby-prism-sys" -version = "1.5.2" +version = "1.5.3" dependencies = [ "bindgen", "cc", diff --git a/rust/ruby-prism-sys/Cargo.toml b/rust/ruby-prism-sys/Cargo.toml index f21c38ccff..60f706cbaa 100644 --- a/rust/ruby-prism-sys/Cargo.toml +++ b/rust/ruby-prism-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruby-prism-sys" -version = "1.5.2" +version = "1.5.3" edition = "2021" license-file = "../../LICENSE.md" repository = "https://github.com/ruby/prism" diff --git a/rust/ruby-prism-sys/tests/utils_tests.rs b/rust/ruby-prism-sys/tests/utils_tests.rs index 99e5fda9d0..4510117af4 100644 --- a/rust/ruby-prism-sys/tests/utils_tests.rs +++ b/rust/ruby-prism-sys/tests/utils_tests.rs @@ -12,7 +12,7 @@ fn version_test() { CStr::from_ptr(version) }; - assert_eq!(&cstring.to_string_lossy(), "1.5.2"); + assert_eq!(&cstring.to_string_lossy(), "1.5.3"); } #[test] diff --git a/rust/ruby-prism/Cargo.toml b/rust/ruby-prism/Cargo.toml index 1e758164fb..1c744f8b57 100644 --- a/rust/ruby-prism/Cargo.toml +++ b/rust/ruby-prism/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruby-prism" -version = "1.5.2" +version = "1.5.3" edition = "2021" license-file = "../../LICENSE.md" repository = "https://github.com/ruby/prism" @@ -26,7 +26,7 @@ serde = { version = "1.0", features = ["derive"] } serde_yaml = "0.9" [dependencies] -ruby-prism-sys = { version = "1.5.2", path = "../ruby-prism-sys" } +ruby-prism-sys = { version = "1.5.3", path = "../ruby-prism-sys" } [features] default = ["vendored"] diff --git a/templates/java/org/prism/Loader.java.erb b/templates/java/org/prism/Loader.java.erb index a5e06c6125..60fca334fa 100644 --- a/templates/java/org/prism/Loader.java.erb +++ b/templates/java/org/prism/Loader.java.erb @@ -102,7 +102,7 @@ public class Loader { expect((byte) 1, "prism major version does not match"); expect((byte) 5, "prism minor version does not match"); - expect((byte) 2, "prism patch version does not match"); + expect((byte) 3, "prism patch version does not match"); expect((byte) 1, "Loader.java requires no location fields in the serialized output"); diff --git a/templates/javascript/src/deserialize.js.erb b/templates/javascript/src/deserialize.js.erb index 046bad448b..6363b11cda 100644 --- a/templates/javascript/src/deserialize.js.erb +++ b/templates/javascript/src/deserialize.js.erb @@ -2,7 +2,7 @@ import * as nodes from "./nodes.js"; const MAJOR_VERSION = 1; const MINOR_VERSION = 5; -const PATCH_VERSION = 2; +const PATCH_VERSION = 3; // The DataView getFloat64 function takes an optional second argument that // specifies whether the number is little-endian or big-endian. It does not diff --git a/templates/lib/prism/serialize.rb.erb b/templates/lib/prism/serialize.rb.erb index 271631b5ac..f82a91b42a 100644 --- a/templates/lib/prism/serialize.rb.erb +++ b/templates/lib/prism/serialize.rb.erb @@ -14,7 +14,7 @@ module Prism # The patch version of prism that we are expecting to find in the serialized # strings. - PATCH_VERSION = 2 + PATCH_VERSION = 3 # Deserialize the dumped output from a request to parse or parse_file. #