validators_spec.rb
6 KB
-
Don't allow trailing newlines in various checks. (#2266) · f1ed0661
There's a subtle difference between what `\Z` and `\z` consider the "end of string" which is that the uppercase version allows a single trailing newline: ``` /\Afoo\Z/.match("foo\n") /\Afoo\Z/.match("foo\n\n") /\Afoo\z/.match("foo\n") ```
Ben Pickles committed