summaryrefslogtreecommitdiff
path: root/include/ruby/encoding.h
diff options
context:
space:
mode:
authorMartin Meyerhoff <mamhoff@gmail.com>2025-02-04 18:00:44 +0100
committergit <svn-admin@ruby-lang.org>2025-05-01 17:50:13 +0000
commitbd1d6e8cd725e84addfac8583634458a624929ae (patch)
tree1fd5bc9ac5d510a47e1fececdb3bba6d28c1060d /include/ruby/encoding.h
parent67b91e780798b80038dbfb39a06831918a75259f (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 'include/ruby/encoding.h')
0 files changed, 0 insertions, 0 deletions