diff options
author | NARUSE, Yui <naruse@airemix.jp> | 2023-03-08 14:46:30 +0900 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2023-03-08 14:46:30 +0900 |
commit | 4e4a4e42b284d9309a7e51c97058093539e7a843 (patch) | |
tree | ce2710dc195ee49e8f41de8b2b68af9b4ca50b23 /version.h | |
parent | 59eb18037ff92839be48fb6c46ff0acc179b4f4c (diff) |
merge revision(s) d2520b7b76759118071a16e6bca22726a5de9fb4: [Backport #19439]
Marshal.load: restore instance variables on Regexp
[Bug #19439]
The instance variables were restore on the Regexp source,
not the regexp itself.
Unfortunately we have a bit of a chicken and egg problem.
The source holds the encoding, and the encoding need to be set on
the source to be able to instantiate the Regexp.
So the instance variables have to be read on the `source`.
To correct this we transfert the instance variables after
instantiating the Regexp.
The only way to avoid this would be to read the instance variable
twice and rewind.
---
marshal.c | 20 ++++++++++++++++++--
spec/ruby/core/marshal/shared/load.rb | 11 +++++++++++
2 files changed, 29 insertions(+), 2 deletions(-)
Diffstat (limited to 'version.h')
-rw-r--r-- | version.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -11,7 +11,7 @@ # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 1 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 37 +#define RUBY_PATCHLEVEL 38 #include "ruby/version.h" #include "ruby/internal/abi.h" |