summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJean Boussier <byroot@ruby-lang.org>2023-02-16 12:18:27 +0100
committerJean Boussier <jean.boussier@gmail.com>2023-02-21 13:57:04 +0100
commitd2520b7b76759118071a16e6bca22726a5de9fb4 (patch)
treecbd1eb444fe832a52f8133b0be3141440ce13a92 /include
parent61709227bbcdb354463861653057315ae977f1a3 (diff)
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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7323
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions