diff options
author | Martin Meyerhoff <[email protected]> | 2025-02-04 18:00:44 +0100 |
---|---|---|
committer | git <[email protected]> | 2025-05-01 17:50:13 +0000 |
commit | bd1d6e8cd725e84addfac8583634458a624929ae (patch) | |
tree | 1fd5bc9ac5d510a47e1fececdb3bba6d28c1060d /test/json/json_generic_object_test.rb | |
parent | 67b91e780798b80038dbfb39a06831918a75259f (diff) |
[ruby/psych] Fix loading/parsing regular expressions
This fixes the issue where regular expression would come back slightly
different after going through a YAML load/dump cycle. Because we're used
to having to escape forward slashes in regular expression literals
(because the literal is delimited by slashes), but the deserializer
takes the literal output from `Regexp#inspect` and feeds it as a string
into `Regexp.new`, which expects a string, not a Regexp literal, cycling
did not properly work before this commit.
I've also changed the code to be a bit more readable, I hope this
doesn't affect performance.
https://github.com/ruby/psych/commit/f4dd8dadad
Diffstat (limited to 'test/json/json_generic_object_test.rb')
0 files changed, 0 insertions, 0 deletions