From 21c499d6e4fb3ca72db1733cb497c14c1010a739 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Thu, 18 Dec 2025 10:10:13 -0500 Subject: [PATCH] Bump to v1.7.0 --- CHANGELOG.md | 24 ++++++++++++++++++++- 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 | 6 +++--- 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 +- 22 files changed, 49 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4070ee860c..c25ca88336 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,27 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ## [Unreleased] +## [1.7.0] - 2025-12-18 + +### Added + +- Support `4.1` as a version option. +- Add `equal_loc` to `CallNode`. +- Add `len()`/`is_empty()` to `ConstantList` and `NodeList` in the Rust API. + +### Changed + +- Rename version `3.5` to version `4.0`. +- Fix compiling the gem from source on Windows. +- Fix parsing of unary method calls like `42.~@`. +- Reject `def f a, (b) = 1`. +- Reject endless method as a block parameter default. +- Reject variable capture in alternative pattern. +- Many fixes in regards to memory safety, found through fuzzing. +- Many fixes to better handle invalid syntax, also found through fuzzing. +- Fix the ruby version used by the `ripper` translator. +- Fix `ruby_parser` translation comment processing. + ## [1.6.0] - 2025-10-16 ### Added @@ -695,7 +716,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.6.0...HEAD +[unreleased]: https://github.com/ruby/prism/compare/v1.7.0...HEAD +[1.7.0]: https://github.com/ruby/prism/compare/v1.6.0...v1.7.0 [1.6.0]: https://github.com/ruby/prism/compare/v1.5.2...v1.6.0 [1.5.2]: https://github.com/ruby/prism/compare/v1.5.1...v1.5.2 [1.5.1]: https://github.com/ruby/prism/compare/v1.5.0...v1.5.1 diff --git a/Gemfile.lock b/Gemfile.lock index d9879c8976..32f4de5b98 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - prism (1.6.0) + prism (1.7.0) GEM remote: https://rubygems.org/ diff --git a/ext/prism/extension.h b/ext/prism/extension.h index 70017a4ae3..6c3de31adb 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.6.0" +#define EXPECTED_PRISM_VERSION "1.7.0" #include #include diff --git a/gemfiles/2.7/Gemfile.lock b/gemfiles/2.7/Gemfile.lock index d8f93319ac..955846d5da 100644 --- a/gemfiles/2.7/Gemfile.lock +++ b/gemfiles/2.7/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.6.0) + prism (1.7.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.0/Gemfile.lock b/gemfiles/3.0/Gemfile.lock index bb2299a4d6..b39a99d8b8 100644 --- a/gemfiles/3.0/Gemfile.lock +++ b/gemfiles/3.0/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.6.0) + prism (1.7.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.1/Gemfile.lock b/gemfiles/3.1/Gemfile.lock index 45495af109..862669bf7d 100644 --- a/gemfiles/3.1/Gemfile.lock +++ b/gemfiles/3.1/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.6.0) + prism (1.7.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.2/Gemfile.lock b/gemfiles/3.2/Gemfile.lock index 8689b73b57..a12fd61e2b 100644 --- a/gemfiles/3.2/Gemfile.lock +++ b/gemfiles/3.2/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.6.0) + prism (1.7.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.3/Gemfile.lock b/gemfiles/3.3/Gemfile.lock index 48b6178d67..f6463f4383 100644 --- a/gemfiles/3.3/Gemfile.lock +++ b/gemfiles/3.3/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.6.0) + prism (1.7.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.4/Gemfile.lock b/gemfiles/3.4/Gemfile.lock index fa863216b5..46b44c8106 100644 --- a/gemfiles/3.4/Gemfile.lock +++ b/gemfiles/3.4/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.6.0) + prism (1.7.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/4.0/Gemfile.lock b/gemfiles/4.0/Gemfile.lock index e927400416..b1dd615155 100644 --- a/gemfiles/4.0/Gemfile.lock +++ b/gemfiles/4.0/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.6.0) + prism (1.7.0) GEM remote: https://rubygems.org/ @@ -49,7 +49,7 @@ DEPENDENCIES test-unit RUBY VERSION - ruby 3.5.0.dev + ruby 3.5.0.dev BUNDLED WITH - 4.0.0.dev + 4.0.0.dev diff --git a/gemfiles/jruby/Gemfile.lock b/gemfiles/jruby/Gemfile.lock index 574af0754d..102562caaf 100644 --- a/gemfiles/jruby/Gemfile.lock +++ b/gemfiles/jruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.6.0) + prism (1.7.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/truffleruby/Gemfile.lock b/gemfiles/truffleruby/Gemfile.lock index f6d64b41fc..35b5718319 100644 --- a/gemfiles/truffleruby/Gemfile.lock +++ b/gemfiles/truffleruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.6.0) + prism (1.7.0) GEM remote: https://rubygems.org/ diff --git a/include/prism/version.h b/include/prism/version.h index f202b0f4d7..0b64a70dff 100644 --- a/include/prism/version.h +++ b/include/prism/version.h @@ -14,7 +14,7 @@ /** * The minor version of the Prism library as an int. */ -#define PRISM_VERSION_MINOR 6 +#define PRISM_VERSION_MINOR 7 /** * The patch version of the Prism library as an int. @@ -24,6 +24,6 @@ /** * The version of the Prism library as a constant string. */ -#define PRISM_VERSION "1.6.0" +#define PRISM_VERSION "1.7.0" #endif diff --git a/javascript/package.json b/javascript/package.json index c7f074e449..c98c168da3 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,6 +1,6 @@ { "name": "@ruby/prism", - "version": "1.6.0", + "version": "1.7.0", "description": "Prism Ruby parser", "type": "module", "main": "src/index.js", diff --git a/prism.gemspec b/prism.gemspec index d9872f88ac..2fb5d1d0b3 100644 --- a/prism.gemspec +++ b/prism.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "prism" - spec.version = "1.6.0" + spec.version = "1.7.0" spec.authors = ["Shopify"] spec.email = ["ruby@shopify.com"] diff --git a/rust/Cargo.lock b/rust/Cargo.lock index e884dd43e2..68ee9317d9 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -202,7 +202,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "ruby-prism" -version = "1.6.0" +version = "1.7.0" dependencies = [ "ruby-prism-sys", "serde", @@ -211,7 +211,7 @@ dependencies = [ [[package]] name = "ruby-prism-sys" -version = "1.6.0" +version = "1.7.0" dependencies = [ "bindgen", "cc", diff --git a/rust/ruby-prism-sys/Cargo.toml b/rust/ruby-prism-sys/Cargo.toml index 64228ddf63..ee0c87f31a 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.6.0" +version = "1.7.0" 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 a5f1b916ba..e65fb8119a 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.6.0"); + assert_eq!(&cstring.to_string_lossy(), "1.7.0"); } #[test] diff --git a/rust/ruby-prism/Cargo.toml b/rust/ruby-prism/Cargo.toml index 2f14c62d6a..14c156a4b8 100644 --- a/rust/ruby-prism/Cargo.toml +++ b/rust/ruby-prism/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruby-prism" -version = "1.6.0" +version = "1.7.0" edition = "2021" license-file = "../../LICENSE.md" 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.6.0", path = "../ruby-prism-sys" } +ruby-prism-sys = { version = "1.7.0", 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 6c52d36feb..1b86b5313d 100644 --- a/templates/java/org/prism/Loader.java.erb +++ b/templates/java/org/prism/Loader.java.erb @@ -101,7 +101,7 @@ public class Loader { expect((byte) 'M', "incorrect prism header"); expect((byte) 1, "prism major version does not match"); - expect((byte) 6, "prism minor version does not match"); + expect((byte) 7, "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 a058d6cfeb..dd113ba9ee 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 = 6; +const MINOR_VERSION = 7; 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 526be67431..63f97dddd7 100644 --- a/templates/lib/prism/serialize.rb.erb +++ b/templates/lib/prism/serialize.rb.erb @@ -10,7 +10,7 @@ module Prism # The minor version of prism that we are expecting to find in the serialized # strings. - MINOR_VERSION = 6 + MINOR_VERSION = 7 # The patch version of prism that we are expecting to find in the serialized # strings.