From e19ded435f462f8eac77a839d062127efe7708a3 Mon Sep 17 00:00:00 2001 From: Randy Stauner Date: Fri, 7 Aug 2026 14:51:50 -0700 Subject: [PATCH] Bump version to 1.10.0 --- CHANGELOG.md | 39 ++++++++++++++++++- 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/4.0/Gemfile.lock | 2 +- gemfiles/4.1/Gemfile.lock | 2 +- include/prism/version.h | 4 +- .../java/org/jruby/parser/prism/WASMTest.java | 2 +- javascript/package.json | 2 +- prism.gemspec | 2 +- rust/Cargo.lock | 4 +- rust/ruby-prism-sys/Cargo.toml | 2 +- rust/ruby-prism-sys/src/bindings.rs | 2 +- rust/ruby-prism-sys/tests/utils_tests.rs | 2 +- rust/ruby-prism/Cargo.toml | 4 +- .../org/ruby_lang/prism/Loader.java.erb | 2 +- templates/javascript/src/deserialize.js.erb | 2 +- templates/lib/prism/serialize.rb.erb | 2 +- 23 files changed, 63 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f9d3b5a4e..cb3e0fb5d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,42 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ## [Unreleased] +## [1.10.0] - 2026-08-07 + +### Added + +- Support `version: "nearest"` to parse with the latest known Ruby version. +- Support the no-block-parameter syntax (`&nil`) for Ruby 4.1+. +- Allow trailing commas in method signatures ([Feature #19107]). +- Add `Prism::ParseResult#continuable?` to determine if parsing can meaningfully continue after errors. +- Add location slices to `Node#deconstruct_keys` for use in pattern matching. +- Add `keyword_loc` to `ForwardingSuperNode`. +- Many additions to the Ripper translation layer: `encoding`/`end_seen?`, `on_label_end`, `on_op`, `on_kw`, bracket/brace and string start/end events, and comments that include newlines. +- Rust: expose parse options, line offsets, and node start offsets; add `ParseResult#is_success`/`is_failure`, `Location` line/column helpers and `chop`, and `full_name` for constant nodes. +- Rust: ship pregenerated bindings in ruby-prism-sys so bindgen is no longer required to build, and allow custom C flags. +- Java: split the artifact into components published to Maven Central, including a WASM parser. +- Support precompiled native gems. + +### Changed + +- Reorganize the C API: the parser, options, buffer, and comment types are now opaque, and public headers are split from internal ones. +- Significant lexing and parsing performance improvements: arena-based allocation, SIMD/SWAR whitespace scanning, a faster constant pool, and fast paths for ASCII identifiers. +- Fix binding power and precedence for `not` in endless methods, `in`/`not`/`do` on and after command calls, infix operators after commands, and rescue modifiers. +- Fix many pattern matching edge cases: trailing commas, duplicate rest patterns, hash pattern keys at EOF, and rejecting pinned back references and pinned numbered references. +- Port the diagnostics format from CRuby. +- Respect the `encoding` option in `Prism.lex` and use the string's encoding as the initial encoding in the Ripper translator. +- Fix `Prism.parse_comments` locations for the FFI backend. +- Fix lexing of unterminated strings and heredocs, and a stack-use-after-return with unterminated heredocs. +- Track newlines in character escape sequences. +- Correctly handle `and?` and similar on Ruby 4.0. +- Fix the error message for block/lambda with a `...` argument. +- Reject `END { break }` and `END { next }` for Ruby 4.0. +- Thoroughly implement void value expression checks ([Bug #21669]). +- Accept a nested target as the first `for` loop index. +- Generate RBI files from RBS using rbs-inline. +- JavaScript: fix `compactChildNodes` dropping node list fields. +- Require arguments to `Source.for` and fix `Source#offsets` with `freeze: true`. + ## [1.9.0] - 2026-01-27 ### Added @@ -753,7 +789,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a - 🎉 Initial release! 🎉 -[unreleased]: https://github.com/ruby/prism/compare/v1.9.0...HEAD +[unreleased]: https://github.com/ruby/prism/compare/v1.10.0...HEAD +[1.10.0]: https://github.com/ruby/prism/compare/v1.9.0...v1.10.0 [1.9.0]: https://github.com/ruby/prism/compare/v1.8.0...v1.9.0 [1.8.1]: https://github.com/ruby/prism/compare/v1.8.0...v1.8.1 [1.8.0]: https://github.com/ruby/prism/compare/v1.7.0...v1.8.0 diff --git a/Gemfile.lock b/Gemfile.lock index 3efb5000fe..5bc8a84c87 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - prism (1.9.0) + prism (1.10.0) GEM remote: https://rubygems.org/ diff --git a/ext/prism/extension.h b/ext/prism/extension.h index d0cbc2ff53..864abdbfbb 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.9.0" +#define EXPECTED_PRISM_VERSION "1.10.0" #include #include diff --git a/gemfiles/2.7/Gemfile.lock b/gemfiles/2.7/Gemfile.lock index 9c0a2512f5..d10bde4ceb 100644 --- a/gemfiles/2.7/Gemfile.lock +++ b/gemfiles/2.7/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.9.0) + prism (1.10.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.0/Gemfile.lock b/gemfiles/3.0/Gemfile.lock index bce4895c72..e5d87e6c7e 100644 --- a/gemfiles/3.0/Gemfile.lock +++ b/gemfiles/3.0/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.9.0) + prism (1.10.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.1/Gemfile.lock b/gemfiles/3.1/Gemfile.lock index 72883e7f5a..a3a7673d1e 100644 --- a/gemfiles/3.1/Gemfile.lock +++ b/gemfiles/3.1/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.9.0) + prism (1.10.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.2/Gemfile.lock b/gemfiles/3.2/Gemfile.lock index 4695176f2a..e3d2d5ea71 100644 --- a/gemfiles/3.2/Gemfile.lock +++ b/gemfiles/3.2/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.9.0) + prism (1.10.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.3/Gemfile.lock b/gemfiles/3.3/Gemfile.lock index f662f33cba..c3873e5b48 100644 --- a/gemfiles/3.3/Gemfile.lock +++ b/gemfiles/3.3/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.9.0) + prism (1.10.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.4/Gemfile.lock b/gemfiles/3.4/Gemfile.lock index 383491ad09..ef7c6a0864 100644 --- a/gemfiles/3.4/Gemfile.lock +++ b/gemfiles/3.4/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.9.0) + prism (1.10.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/4.0/Gemfile.lock b/gemfiles/4.0/Gemfile.lock index f7e9158a4b..c7e5ea858a 100644 --- a/gemfiles/4.0/Gemfile.lock +++ b/gemfiles/4.0/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.9.0) + prism (1.10.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/4.1/Gemfile.lock b/gemfiles/4.1/Gemfile.lock index bf73343a15..90c92f8cd9 100644 --- a/gemfiles/4.1/Gemfile.lock +++ b/gemfiles/4.1/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.9.0) + prism (1.10.0) GEM remote: https://rubygems.org/ diff --git a/include/prism/version.h b/include/prism/version.h index 181b398462..fa0d3ccfb8 100644 --- a/include/prism/version.h +++ b/include/prism/version.h @@ -16,7 +16,7 @@ /** * The minor version of the Prism library as an int. */ -#define PRISM_VERSION_MINOR 9 +#define PRISM_VERSION_MINOR 10 /** * The patch version of the Prism library as an int. @@ -26,7 +26,7 @@ /** * The version of the Prism library as a constant string. */ -#define PRISM_VERSION "1.9.0" +#define PRISM_VERSION "1.10.0" /** * The prism version and the serialization format. diff --git a/java/wasm/src/test/java/org/jruby/parser/prism/WASMTest.java b/java/wasm/src/test/java/org/jruby/parser/prism/WASMTest.java index 1056075b89..dce901bff3 100644 --- a/java/wasm/src/test/java/org/jruby/parser/prism/WASMTest.java +++ b/java/wasm/src/test/java/org/jruby/parser/prism/WASMTest.java @@ -77,7 +77,7 @@ public void testMBCIdentifier() { @Test public void testVersion() { try (Prism prism = new Prism()) { - assertEquals("1.9.0", prism.version()); + assertEquals("1.10.0", prism.version()); } } } diff --git a/javascript/package.json b/javascript/package.json index bbdcef849f..5622af50da 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,6 +1,6 @@ { "name": "@ruby/prism", - "version": "1.9.0", + "version": "1.10.0", "description": "Prism Ruby parser", "type": "module", "main": "src/index.js", diff --git a/prism.gemspec b/prism.gemspec index c5fa776f83..0522bef282 100644 --- a/prism.gemspec +++ b/prism.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "prism" - spec.version = "1.9.0" + spec.version = "1.10.0" spec.authors = ["Shopify"] spec.email = ["ruby@shopify.com"] diff --git a/rust/Cargo.lock b/rust/Cargo.lock index b8d1b2fe3b..2cc0dfc1ac 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -209,7 +209,7 @@ checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "ruby-prism" -version = "1.9.0" +version = "1.10.0" dependencies = [ "ruby-prism-sys", "serde", @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "ruby-prism-sys" -version = "1.9.0" +version = "1.10.0" dependencies = [ "bindgen", "cc", diff --git a/rust/ruby-prism-sys/Cargo.toml b/rust/ruby-prism-sys/Cargo.toml index f48979abfe..e184e3a74b 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.9.0" +version = "1.10.0" edition = "2021" license = "MIT" repository = "https://github.com/ruby/prism" diff --git a/rust/ruby-prism-sys/src/bindings.rs b/rust/ruby-prism-sys/src/bindings.rs index d6f23a6e27..3181bc5b57 100644 --- a/rust/ruby-prism-sys/src/bindings.rs +++ b/rust/ruby-prism-sys/src/bindings.rs @@ -1,5 +1,5 @@ /* Generated by `bundle exec rake cargo:bindings`. Do not edit by hand. - * prism 1.9.0, bindgen 0.72.1, layout_tests(false) + * prism 1.10.0, bindgen 0.72.1, layout_tests(false) * so the file stays portable across pointer widths. */ /* automatically generated by rust-bindgen 0.72.1 */ diff --git a/rust/ruby-prism-sys/tests/utils_tests.rs b/rust/ruby-prism-sys/tests/utils_tests.rs index c619765c63..753a1f3971 100644 --- a/rust/ruby-prism-sys/tests/utils_tests.rs +++ b/rust/ruby-prism-sys/tests/utils_tests.rs @@ -9,5 +9,5 @@ fn version_test() { CStr::from_ptr(version) }; - assert_eq!(&cstring.to_string_lossy(), "1.9.0"); + assert_eq!(&cstring.to_string_lossy(), "1.10.0"); } diff --git a/rust/ruby-prism/Cargo.toml b/rust/ruby-prism/Cargo.toml index 302780399c..5c25df6714 100644 --- a/rust/ruby-prism/Cargo.toml +++ b/rust/ruby-prism/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruby-prism" -version = "1.9.0" +version = "1.10.0" edition = "2021" license = "MIT" repository = "https://github.com/ruby/prism" @@ -26,7 +26,7 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" [dependencies] -ruby-prism-sys = { version = "1.9.0", path = "../ruby-prism-sys" } +ruby-prism-sys = { version = "1.10.0", path = "../ruby-prism-sys" } [features] default = ["vendored"] diff --git a/templates/java/api/src/main/java-templates/org/ruby_lang/prism/Loader.java.erb b/templates/java/api/src/main/java-templates/org/ruby_lang/prism/Loader.java.erb index f1785e5d30..3f160d970a 100644 --- a/templates/java/api/src/main/java-templates/org/ruby_lang/prism/Loader.java.erb +++ b/templates/java/api/src/main/java-templates/org/ruby_lang/prism/Loader.java.erb @@ -82,7 +82,7 @@ public class Loader { expect((byte) 'M', "incorrect prism header"); expect((byte) 1, "prism major version does not match"); - expect((byte) 9, "prism minor version does not match"); + expect((byte) 10, "prism minor version does not match"); expect((byte) 0, "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 49499c43ea..d180867888 100644 --- a/templates/javascript/src/deserialize.js.erb +++ b/templates/javascript/src/deserialize.js.erb @@ -1,7 +1,7 @@ import * as nodes from "./nodes.js"; const MAJOR_VERSION = 1; -const MINOR_VERSION = 9; +const MINOR_VERSION = 10; const PATCH_VERSION = 0; // The DataView getFloat64 function takes an optional second argument that diff --git a/templates/lib/prism/serialize.rb.erb b/templates/lib/prism/serialize.rb.erb index ec6a19ead0..867336cfd2 100644 --- a/templates/lib/prism/serialize.rb.erb +++ b/templates/lib/prism/serialize.rb.erb @@ -13,7 +13,7 @@ module Prism # The minor version of prism that we are expecting to find in the serialized # strings. - MINOR_VERSION = 9 + MINOR_VERSION = 10 # The patch version of prism that we are expecting to find in the serialized # strings.