Sorry, where I last wrote "empty" I meant to write "blank," ie: That's why I think an array full of false, empty, or whitespace strings should be _blank_. Rails defines blank as a convenience method instead of checking if something is nil and then if it's empty or not. I think extending that convenience to arrays makes sense. To clarify:
["", ""].empty? # false ["", ""].blank? # true - Michael On Monday, July 9, 2012 10:15:04 AM UTC-4, Michael Boutros wrote: > > Hello: > > 1.9.3p194 :014 > "".blank? > => true > 1.9.3p194 :015 > ["", ""].blank? > => false > > Proposal: the second line should also produce true. > > Thoughts? > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/6QBZ6XsNQU0J. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.