This project is closed and read-only.
Actions
Backport #8001
closed2.0 Regexp \Z matches where it shouldn't
Backport #8001:
2.0 Regexp \Z matches where it shouldn't
Status:
Closed
Assignee:
Description
=begin
for ruby in /.rbenv/versions/{1.9.3-p327,2.0.0-p0}/bin/ruby "x\ny"'
do
"$ruby" -v
"$ruby" -e 'p /x.*?\Z$/ =
done
:In Ruby 1.9: (({nil}))
:In Ruby 2.0: (({0}))
If you remove the "y" from the string, or add more, then they do the same thing.
The temporary solution I'm using to get around this is to replace (({\Z})) with (({\n\z}))
=end
Actions