--
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/-/Rbgmrz1cT7AJ.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-co...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
nil
, [], and {} are all blank. That's why I think an array full of false, empty, or whitespace strings should be empty.Michael,That array isn't blank, empty strings aren't the same as nils. I think changing that behavior would be confusing. If you don't want to count those elements, it's probably best to filter the array for non-blank strings.-Geoff--Geoff HarcourtOn Monday, July 9, 2012 at 10:15 AM, Michael Boutros wrote:
Hello:1.9.3p194 :014 > "".blank?=> true1.9.3p194 :015 > ["", ""].blank?=> falseProposal: 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/-/Rbgmrz1cT7AJ.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com.
Geoff,But from the Rails documentation: An object is blank if it’s false, empty, or a whitespace string. For example, “”, “ ”,nil
, [], and {} are all blank. That's why I think an array full of false, empty, or whitespace strings should be empty.
nil
, [], and {} are > all blank. That's why I think an array full of false, empty, or whitespace strings should be empty.To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/KDc5odVcWngJ.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-co...@googlegroups.com.
Yes.
--
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/-/st6ddnnWkPMJ.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/KDc5odVcWngJ.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-co...@googlegroups.com.
--
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/-/Rbgmrz1cT7AJ.
--
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.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.