Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information