#38 ✓resolved
Nick Plante

[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

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Attachments

Tags

Pages