diff --git a/CHANGELOG.md b/CHANGELOG.md index d4758eaa2f..1a329fb1fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ## [Unreleased] +## [2.1.0] - 2026-10-28 + ### Added - Add `Version::CRuby4_0` to the Rust bindings. `Version::CRuby3_5` remains available but is deprecated in favor of the new name; both select Ruby 4.0 syntax. +- Let embedders set the allocation size for the first block allocated in an arena via `PM_ARENA_INITIAL_SIZE`. +- Let embedders set the minimum initial size for the constant pool via `PM_CONSTANT_POOL_MIN_CAPACITY`. ## [2.0.0] - 2026-10-21 @@ -841,45 +845,46 @@ Note that for this major version, almost every change listed below is breaking. - 🎉 Initial release! 🎉 -[unreleased]: https://github.com/ruby/prism/compare/v2.0.0...HEAD -[2.0.0]: https://github.com/ruby/prism/compare/v1.9.0...v2.0.0 -[1.9.0]: https://github.com/ruby/prism/compare/v1.8.1...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 -[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 -[1.5.0]: https://github.com/ruby/prism/compare/v1.4.0...v1.5.0 -[1.4.0]: https://github.com/ruby/prism/compare/v1.3.0...v1.4.0 -[1.3.0]: https://github.com/ruby/prism/compare/v1.2.0...v1.3.0 -[1.2.0]: https://github.com/ruby/prism/compare/v1.1.0...v1.2.0 -[1.1.0]: https://github.com/ruby/prism/compare/v1.0.0...v1.1.0 -[1.0.0]: https://github.com/ruby/prism/compare/v0.30.0...v1.0.0 -[0.30.0]: https://github.com/ruby/prism/compare/v0.29.0...v0.30.0 -[0.29.0]: https://github.com/ruby/prism/compare/v0.28.0...v0.29.0 -[0.28.0]: https://github.com/ruby/prism/compare/v0.27.0...v0.28.0 -[0.27.0]: https://github.com/ruby/prism/compare/v0.26.0...v0.27.0 -[0.26.0]: https://github.com/ruby/prism/compare/v0.25.0...v0.26.0 -[0.25.0]: https://github.com/ruby/prism/compare/v0.24.0...v0.25.0 -[0.24.0]: https://github.com/ruby/prism/compare/v0.23.0...v0.24.0 -[0.23.0]: https://github.com/ruby/prism/compare/v0.22.0...v0.23.0 -[0.22.0]: https://github.com/ruby/prism/compare/v0.21.0...v0.22.0 -[0.21.0]: https://github.com/ruby/prism/compare/v0.20.0...v0.21.0 -[0.20.0]: https://github.com/ruby/prism/compare/v0.19.0...v0.20.0 -[0.19.0]: https://github.com/ruby/prism/compare/v0.18.0...v0.19.0 -[0.18.0]: https://github.com/ruby/prism/compare/v0.17.1...v0.18.0 -[0.17.1]: https://github.com/ruby/prism/compare/v0.17.0...v0.17.1 -[0.17.0]: https://github.com/ruby/prism/compare/v0.16.0...v0.17.0 -[0.16.0]: https://github.com/ruby/prism/compare/v0.15.1...v0.16.0 -[0.15.1]: https://github.com/ruby/prism/compare/v0.15.0...v0.15.1 -[0.15.0]: https://github.com/ruby/prism/compare/v0.14.0...v0.15.0 -[0.14.0]: https://github.com/ruby/prism/compare/v0.13.0...v0.14.0 -[0.13.0]: https://github.com/ruby/prism/compare/v0.12.0...v0.13.0 -[0.12.0]: https://github.com/ruby/prism/compare/v0.11.0...v0.12.0 -[0.11.0]: https://github.com/ruby/prism/compare/v0.10.0...v0.11.0 -[0.10.0]: https://github.com/ruby/prism/compare/v0.9.0...v0.10.0 -[0.9.0]: https://github.com/ruby/prism/compare/v0.8.0...v0.9.0 -[0.8.0]: https://github.com/ruby/prism/compare/v0.7.0...v0.8.0 -[0.7.0]: https://github.com/ruby/prism/compare/v0.6.0...v0.7.0 -[0.6.0]: https://github.com/ruby/prism/compare/d60531...v0.6.0 +[unreleased]: https://github.com/ruby/prism3/compare/v2.1.0...HEAD +[2.1.0]: https://github.com/ruby/prism3/compare/v2.0.0...v2.1.0 +[2.0.0]: https://github.com/ruby/prism3/compare/v1.9.0...v2.0.0 +[1.9.0]: https://github.com/ruby/prism3/compare/v1.8.1...v1.9.0 +[1.8.1]: https://github.com/ruby/prism3/compare/v1.8.0...v1.8.1 +[1.8.0]: https://github.com/ruby/prism3/compare/v1.7.0...v1.8.0 +[1.7.0]: https://github.com/ruby/prism3/compare/v1.6.0...v1.7.0 +[1.6.0]: https://github.com/ruby/prism3/compare/v1.5.2...v1.6.0 +[1.5.2]: https://github.com/ruby/prism3/compare/v1.5.1...v1.5.2 +[1.5.1]: https://github.com/ruby/prism3/compare/v1.5.0...v1.5.1 +[1.5.0]: https://github.com/ruby/prism3/compare/v1.4.0...v1.5.0 +[1.4.0]: https://github.com/ruby/prism3/compare/v1.3.0...v1.4.0 +[1.3.0]: https://github.com/ruby/prism3/compare/v1.2.0...v1.3.0 +[1.2.0]: https://github.com/ruby/prism3/compare/v1.1.0...v1.2.0 +[1.1.0]: https://github.com/ruby/prism3/compare/v1.0.0...v1.1.0 +[1.0.0]: https://github.com/ruby/prism3/compare/v0.30.0...v1.0.0 +[0.30.0]: https://github.com/ruby/prism3/compare/v0.29.0...v0.30.0 +[0.29.0]: https://github.com/ruby/prism3/compare/v0.28.0...v0.29.0 +[0.28.0]: https://github.com/ruby/prism3/compare/v0.27.0...v0.28.0 +[0.27.0]: https://github.com/ruby/prism3/compare/v0.26.0...v0.27.0 +[0.26.0]: https://github.com/ruby/prism3/compare/v0.25.0...v0.26.0 +[0.25.0]: https://github.com/ruby/prism3/compare/v0.24.0...v0.25.0 +[0.24.0]: https://github.com/ruby/prism3/compare/v0.23.0...v0.24.0 +[0.23.0]: https://github.com/ruby/prism3/compare/v0.22.0...v0.23.0 +[0.22.0]: https://github.com/ruby/prism3/compare/v0.21.0...v0.22.0 +[0.21.0]: https://github.com/ruby/prism3/compare/v0.20.0...v0.21.0 +[0.20.0]: https://github.com/ruby/prism3/compare/v0.19.0...v0.20.0 +[0.19.0]: https://github.com/ruby/prism3/compare/v0.18.0...v0.19.0 +[0.18.0]: https://github.com/ruby/prism3/compare/v0.17.1...v0.18.0 +[0.17.1]: https://github.com/ruby/prism3/compare/v0.17.0...v0.17.1 +[0.17.0]: https://github.com/ruby/prism3/compare/v0.16.0...v0.17.0 +[0.16.0]: https://github.com/ruby/prism3/compare/v0.15.1...v0.16.0 +[0.15.1]: https://github.com/ruby/prism3/compare/v0.15.0...v0.15.1 +[0.15.0]: https://github.com/ruby/prism3/compare/v0.14.0...v0.15.0 +[0.14.0]: https://github.com/ruby/prism3/compare/v0.13.0...v0.14.0 +[0.13.0]: https://github.com/ruby/prism3/compare/v0.12.0...v0.13.0 +[0.12.0]: https://github.com/ruby/prism3/compare/v0.11.0...v0.12.0 +[0.11.0]: https://github.com/ruby/prism3/compare/v0.10.0...v0.11.0 +[0.10.0]: https://github.com/ruby/prism3/compare/v0.9.0...v0.10.0 +[0.9.0]: https://github.com/ruby/prism3/compare/v0.8.0...v0.9.0 +[0.8.0]: https://github.com/ruby/prism3/compare/v0.7.0...v0.8.0 +[0.7.0]: https://github.com/ruby/prism3/compare/v0.6.0...v0.7.0 +[0.6.0]: https://github.com/ruby/prism3/compare/d60531...v0.6.0 diff --git a/Gemfile.lock b/Gemfile.lock index 7664da502c..b4fb8cbdd6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - prism (2.0.0) + prism (2.1.0) GEM remote: https://rubygems.org/ diff --git a/ext/prism/extension.h b/ext/prism/extension.h index a3ebba9464..cd6b3d670a 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 "2.0.0" +#define EXPECTED_PRISM_VERSION "2.1.0" #include #include diff --git a/gemfiles/2.7/Gemfile.lock b/gemfiles/2.7/Gemfile.lock index 33e72688fb..45e358e940 100644 --- a/gemfiles/2.7/Gemfile.lock +++ b/gemfiles/2.7/Gemfile.lock @@ -1,14 +1,14 @@ PATH remote: ../.. specs: - prism (2.0.0) + prism (2.1.0) GEM remote: https://rubygems.org/ specs: ast (2.4.3) onigmo (0.1.0) - parser (3.3.12.0) + parser (3.3.13.0) ast (~> 2.4.1) racc power_assert (3.1.0) diff --git a/gemfiles/3.0/Gemfile.lock b/gemfiles/3.0/Gemfile.lock index 7bb00c6f37..ecc0a3a6ee 100644 --- a/gemfiles/3.0/Gemfile.lock +++ b/gemfiles/3.0/Gemfile.lock @@ -1,14 +1,14 @@ PATH remote: ../.. specs: - prism (2.0.0) + prism (2.1.0) GEM remote: https://rubygems.org/ specs: ast (2.4.3) onigmo (0.1.0) - parser (3.3.12.0) + parser (3.3.13.0) ast (~> 2.4.1) racc power_assert (3.1.0) diff --git a/gemfiles/3.1/Gemfile.lock b/gemfiles/3.1/Gemfile.lock index b155f8e91d..3a13679e65 100644 --- a/gemfiles/3.1/Gemfile.lock +++ b/gemfiles/3.1/Gemfile.lock @@ -1,14 +1,14 @@ PATH remote: ../.. specs: - prism (2.0.0) + prism (2.1.0) GEM remote: https://rubygems.org/ specs: ast (2.4.3) onigmo (0.1.0) - parser (3.3.12.0) + parser (3.3.13.0) ast (~> 2.4.1) racc power_assert (3.1.0) diff --git a/gemfiles/3.2/Gemfile.lock b/gemfiles/3.2/Gemfile.lock index e64a5b2ce0..9f86bef2d3 100644 --- a/gemfiles/3.2/Gemfile.lock +++ b/gemfiles/3.2/Gemfile.lock @@ -1,14 +1,14 @@ PATH remote: ../.. specs: - prism (2.0.0) + prism (2.1.0) GEM remote: https://rubygems.org/ specs: ast (2.4.3) onigmo (0.1.0) - parser (3.3.12.0) + parser (3.3.13.0) ast (~> 2.4.1) racc power_assert (3.1.0) diff --git a/gemfiles/3.3/Gemfile.lock b/gemfiles/3.3/Gemfile.lock index 2d0ee2e1f4..1a00a4b2a1 100644 --- a/gemfiles/3.3/Gemfile.lock +++ b/gemfiles/3.3/Gemfile.lock @@ -1,14 +1,14 @@ PATH remote: ../.. specs: - prism (2.0.0) + prism (2.1.0) GEM remote: https://rubygems.org/ specs: ast (2.4.3) onigmo (0.1.0) - parser (3.3.12.0) + parser (3.3.13.0) ast (~> 2.4.1) racc power_assert (3.1.0) diff --git a/gemfiles/3.4/Gemfile.lock b/gemfiles/3.4/Gemfile.lock index 441a7ed657..d4374874a7 100644 --- a/gemfiles/3.4/Gemfile.lock +++ b/gemfiles/3.4/Gemfile.lock @@ -1,14 +1,14 @@ PATH remote: ../.. specs: - prism (2.0.0) + prism (2.1.0) GEM remote: https://rubygems.org/ specs: ast (2.4.3) onigmo (0.1.0) - parser (3.3.12.0) + parser (3.3.13.0) ast (~> 2.4.1) racc power_assert (3.1.0) diff --git a/gemfiles/4.0/Gemfile.lock b/gemfiles/4.0/Gemfile.lock index 88fc3234a4..a559e3ae77 100644 --- a/gemfiles/4.0/Gemfile.lock +++ b/gemfiles/4.0/Gemfile.lock @@ -1,14 +1,14 @@ PATH remote: ../.. specs: - prism (2.0.0) + prism (2.1.0) GEM remote: https://rubygems.org/ specs: ast (2.4.3) onigmo (0.1.0) - parser (3.3.12.0) + parser (3.3.13.0) ast (~> 2.4.1) racc power_assert (3.1.0) diff --git a/gemfiles/4.1/Gemfile.lock b/gemfiles/4.1/Gemfile.lock index 6cceda03f6..d25188a5b6 100644 --- a/gemfiles/4.1/Gemfile.lock +++ b/gemfiles/4.1/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (2.0.0) + prism (2.1.0) GEM remote: https://rubygems.org/ diff --git a/include/prism/version.h b/include/prism/version.h index 7376932970..daa15a42a4 100644 --- a/include/prism/version.h +++ b/include/prism/version.h @@ -20,7 +20,7 @@ extern "C" { /** * The minor version of the Prism library as an int. */ -#define PRISM_VERSION_MINOR 0 +#define PRISM_VERSION_MINOR 1 /** * The patch version of the Prism library as an int. @@ -30,7 +30,7 @@ extern "C" { /** * The version of the Prism library as a constant string. */ -#define PRISM_VERSION "2.0.0" +#define PRISM_VERSION "2.1.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 7aae8ca43b..2633ef4a04 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 @@ -88,7 +88,7 @@ public void testMBCIdentifier() { @Test public void testVersion() { try (Prism prism = new Prism()) { - assertEquals("2.0.0", prism.version()); + assertEquals("2.1.0", prism.version()); } } } diff --git a/javascript/package.json b/javascript/package.json index a7dbeb16c9..6afd1d7560 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,6 +1,6 @@ { "name": "@ruby/prism", - "version": "2.0.0", + "version": "2.1.0", "description": "Prism Ruby parser", "type": "module", "main": "src/index.js", diff --git a/prism.gemspec b/prism.gemspec index a02629a7c4..f9a06c73a1 100644 --- a/prism.gemspec +++ b/prism.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "prism" - spec.version = "2.0.0" + spec.version = "2.1.0" spec.authors = ["Ruby developers"] spec.email = ["ruby-core@ruby-lang.org"] diff --git a/rust/Cargo.lock b/rust/Cargo.lock index ed2f8d083d..77a5b248a8 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -193,7 +193,7 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" [[package]] name = "ruby-prism" -version = "2.0.0" +version = "2.1.0" dependencies = [ "ruby-prism-sys", "serde", @@ -202,7 +202,7 @@ dependencies = [ [[package]] name = "ruby-prism-sys" -version = "2.0.0" +version = "2.1.0" dependencies = [ "bindgen", "cc", diff --git a/rust/ruby-prism-sys/Cargo.toml b/rust/ruby-prism-sys/Cargo.toml index e23a0b93ce..efdf349891 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 = "2.0.0" +version = "2.1.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 47a889b770..a8c2092668 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 2.0.0, bindgen 0.73.2, layout_tests(false) + * prism 2.1.0, bindgen 0.73.2, layout_tests(false) * so the file stays portable across pointer widths. */ /* automatically generated by rust-bindgen 0.73.2 */ diff --git a/rust/ruby-prism-sys/tests/utils_tests.rs b/rust/ruby-prism-sys/tests/utils_tests.rs index 0599c49287..649f35b2ca 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(), "2.0.0"); + assert_eq!(&cstring.to_string_lossy(), "2.1.0"); } diff --git a/rust/ruby-prism/Cargo.toml b/rust/ruby-prism/Cargo.toml index 0a82e78d53..0ec7b02a8a 100644 --- a/rust/ruby-prism/Cargo.toml +++ b/rust/ruby-prism/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruby-prism" -version = "2.0.0" +version = "2.1.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 = "2.0.0", path = "../ruby-prism-sys" } +ruby-prism-sys = { version = "2.1.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 199ea3a4e8..f360fc21d7 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 @@ -91,7 +91,7 @@ public class Loader { expect((byte) 'M', "incorrect prism header"); expect((byte) 2, "prism major version does not match"); - expect((byte) 0, "prism minor version does not match"); + expect((byte) 1, "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 4b49f1d634..d1fdbf507c 100644 --- a/templates/javascript/src/deserialize.js.erb +++ b/templates/javascript/src/deserialize.js.erb @@ -4,7 +4,7 @@ import { Location } from "./location.js"; import { Source } from "./source.js"; const MAJOR_VERSION = 2; -const MINOR_VERSION = 0; +const MINOR_VERSION = 1; 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 4db25188d9..32afb2fd29 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 = 0 + MINOR_VERSION = 1 # The patch version of prism that we are expecting to find in the serialized # strings.