diff --git a/CHANGELOG.md b/CHANGELOG.md index c25ca88336..47309f6955 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.8.0] - 2026-01-12 + +### Added + +- Optimize ruby visitor. +- Report unterminated construct errors at opening token. + +### Changed + +- Correctly expose ripper state. +- Use one file for versioned parser classes. +- Fix denominator of rational float literal. +- Decouple ripper translator from ripper library. +- Sync Prism::Translation::ParserCurrent with Ruby 4.0. + ## [Unreleased] ## [1.7.0] - 2025-12-18 @@ -716,7 +731,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.7.0...HEAD +[unreleased]: https://github.com/ruby/prism/compare/v1.8.0...HEAD +[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 diff --git a/Gemfile.lock b/Gemfile.lock index 0a320f9204..be87f10dc9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - prism (1.7.0) + prism (1.8.0) GEM remote: https://rubygems.org/ diff --git a/ext/prism/extension.h b/ext/prism/extension.h index 6c3de31adb..510faa48e8 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.7.0" +#define EXPECTED_PRISM_VERSION "1.8.0" #include #include diff --git a/gemfiles/2.7/Gemfile.lock b/gemfiles/2.7/Gemfile.lock index fa6ec04127..3fa115850d 100644 --- a/gemfiles/2.7/Gemfile.lock +++ b/gemfiles/2.7/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.7.0) + prism (1.8.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.0/Gemfile.lock b/gemfiles/3.0/Gemfile.lock index e9dd35d5ed..303edfa80a 100644 --- a/gemfiles/3.0/Gemfile.lock +++ b/gemfiles/3.0/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.7.0) + prism (1.8.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.1/Gemfile.lock b/gemfiles/3.1/Gemfile.lock index 90405a6ee6..3fbbe68884 100644 --- a/gemfiles/3.1/Gemfile.lock +++ b/gemfiles/3.1/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.7.0) + prism (1.8.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.2/Gemfile.lock b/gemfiles/3.2/Gemfile.lock index 03b6c11ec7..e9ff984487 100644 --- a/gemfiles/3.2/Gemfile.lock +++ b/gemfiles/3.2/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.7.0) + prism (1.8.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.3/Gemfile.lock b/gemfiles/3.3/Gemfile.lock index 518470cc35..41b37733e4 100644 --- a/gemfiles/3.3/Gemfile.lock +++ b/gemfiles/3.3/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.7.0) + prism (1.8.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/3.4/Gemfile.lock b/gemfiles/3.4/Gemfile.lock index 695b0e979c..11aa5853ae 100644 --- a/gemfiles/3.4/Gemfile.lock +++ b/gemfiles/3.4/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.7.0) + prism (1.8.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/4.0/Gemfile.lock b/gemfiles/4.0/Gemfile.lock index a652b0a3d4..1423f41818 100644 --- a/gemfiles/4.0/Gemfile.lock +++ b/gemfiles/4.0/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.7.0) + prism (1.8.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/4.1/Gemfile.lock b/gemfiles/4.1/Gemfile.lock index efcf866916..a727c5e240 100644 --- a/gemfiles/4.1/Gemfile.lock +++ b/gemfiles/4.1/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - prism (1.7.0) + prism (1.8.0) GEM remote: https://rubygems.org/ diff --git a/include/prism/version.h b/include/prism/version.h index 0b64a70dff..0ef7435c17 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 7 +#define PRISM_VERSION_MINOR 8 /** * 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.7.0" +#define PRISM_VERSION "1.8.0" #endif diff --git a/javascript/package.json b/javascript/package.json index 570298da18..e99e83e219 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,6 +1,6 @@ { "name": "@ruby/prism", - "version": "1.7.0", + "version": "1.8.0", "description": "Prism Ruby parser", "type": "module", "main": "src/index.js", diff --git a/prism.gemspec b/prism.gemspec index 9f5d458d6c..463387e55c 100644 --- a/prism.gemspec +++ b/prism.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "prism" - spec.version = "1.7.0" + spec.version = "1.8.0" spec.authors = ["Shopify"] spec.email = ["ruby@shopify.com"] diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 68ee9317d9..70d1bb1e99 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -202,7 +202,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "ruby-prism" -version = "1.7.0" +version = "1.8.0" dependencies = [ "ruby-prism-sys", "serde", @@ -211,7 +211,7 @@ dependencies = [ [[package]] name = "ruby-prism-sys" -version = "1.7.0" +version = "1.8.0" dependencies = [ "bindgen", "cc", diff --git a/rust/ruby-prism-sys/Cargo.toml b/rust/ruby-prism-sys/Cargo.toml index ee0c87f31a..d4db645e2a 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.7.0" +version = "1.8.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 e65fb8119a..00db216347 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.7.0"); + assert_eq!(&cstring.to_string_lossy(), "1.8.0"); } #[test] diff --git a/rust/ruby-prism/Cargo.toml b/rust/ruby-prism/Cargo.toml index 14c156a4b8..c3bb4cfc7a 100644 --- a/rust/ruby-prism/Cargo.toml +++ b/rust/ruby-prism/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruby-prism" -version = "1.7.0" +version = "1.8.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.7.0", path = "../ruby-prism-sys" } +ruby-prism-sys = { version = "1.8.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 1b86b5313d..7288aecc17 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) 7, "prism minor version does not match"); + expect((byte) 8, "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 dd113ba9ee..6a09098344 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 = 7; +const MINOR_VERSION = 8; 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 63f97dddd7..6902df5c01 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 = 7 + MINOR_VERSION = 8 # The patch version of prism that we are expecting to find in the serialized # strings.