
[patch] String#blank? regexp wrong, breaks Text type coercion
Reported by Nick Plante | November 7th, 2007 @ 09:07 AM
String.blank? will return true if there are sequential newlines. Regexp is /^\s*$/ when it should be /\A\s*\Z/. This causes type coercion of Text fields to return nil if this pattern is contained in the field. Patch contains a spec to detect the problem and the (tiny) fix.
Comments and changes to this ticket
-
-
Dan Kubb (dkubb) July 29th, 2016 @ 02:25 AM
- Tag set to bug, patch, spec
(from [4eacaf96d3c6cc6096bf83d544327c6f9aaf746a]) Respect rails path configuration for migrations (which defaults to db/migrations; resolves #38 https://github.com/datamapper/dm-rails/commit/4eacaf96d3c6cc6096bf8...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »