From 967b56816acf8620466f0ee053878bff02ac3faa Mon Sep 17 00:00:00 2001 From: Paul Mucur Date: Sat, 11 Nov 2023 13:21:30 +0000 Subject: [PATCH] Bump to version 2.4.0 --- CHANGELOG.md | 10 ++++++++++ README.md | 10 +++++++--- lib/re2/version.rb | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dd01a5..85bb8bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ project adheres to [Semantic Versioning](http://semver.org/). Older versions are detailed as [GitHub releases](https://github.com/mudge/re2/releases) for this project. +## [2.4.0] - 2023-11-11 +### Added +- Improve garbage collection and support compaction in newer versions of Ruby. + Thanks to @byroot for contributing this by switching to Ruby's TypedData API. + +### Changed +- No longer needlessly return copies of frozen strings passed to + `RE2::Regexp#match` and return the original instead. + ## [2.3.0] - 2023-10-31 ### Changed - Upgrade the bundled version of RE2 to 2023-11-01. @@ -180,6 +189,7 @@ releases](https://github.com/mudge/re2/releases) for this project. ### Fixed - In Ruby 1.9.2 and later, re2 will now set the correct encoding for strings +[2.4.0]: https://github.com/mudge/re2/releases/tag/v2.4.0 [2.3.0]: https://github.com/mudge/re2/releases/tag/v2.3.0 [2.2.0]: https://github.com/mudge/re2/releases/tag/v2.2.0 [2.1.3]: https://github.com/mudge/re2/releases/tag/v2.1.3 diff --git a/README.md b/README.md index 3f11cdd..8f14993 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Ruby bindings to [RE2][], a "fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python". -**Current version:** 2.3.0 +**Current version:** 2.4.0 **Supported Ruby versions:** 2.6, 2.7, 3.0, 3.1, 3.2 **Bundled RE2 version:** libre2.11 (2023-11-01) **Supported RE2 versions:** libre2.0 (< 2020-03-02), libre2.1 (2020-03-02), libre2.6 (2020-03-03), libre2.7 (2020-05-01), libre2.8 (2020-07-06), libre2.9 (2020-11-01), libre2.10 (2022-12-01), libre2.11 (2023-07-01) @@ -39,8 +39,9 @@ If you are using Debian, you can install the [libre2-dev][] package like so: $ sudo apt-get install libre2-dev -Recent versions of RE2 require a compiler with C++14 support such as -[clang](http://clang.llvm.org/) 3.4 or [gcc](https://gcc.gnu.org/) 5. +Recent versions of RE2 require [CMake](https://cmake.org) and a compiler with +C++14 support such as [clang](http://clang.llvm.org/) 3.4 or +[gcc](https://gcc.gnu.org/) 5. If you are using a packaged Ruby distribution, make sure you also have the Ruby header files installed such as those provided by the [ruby-dev][] package @@ -269,6 +270,9 @@ Contributions * Thanks to [Peter Zhu](https://github.com/peterzhu2118) for [ruby_memcheck](https://github.com/Shopify/ruby_memcheck) and helping find the memory leaks fixed in 2.1.3. +* Thanks to [Jean Boussier](https://github.com/byroot) for contributing the + switch to Ruby's `TypedData` API and the resulting garbage collection + improvements in 2.4.0. Contact ------- diff --git a/lib/re2/version.rb b/lib/re2/version.rb index bc1fe9a..6e030c2 100644 --- a/lib/re2/version.rb +++ b/lib/re2/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module RE2 - VERSION = "2.3.0" + VERSION = "2.4.0" end