Skip to content
Browse files

Revert "Use any instead of length"

This reverts commit 1756629.
  • Loading branch information...
1 parent 152bd3c commit 89925e817c356c292a195c894779b55307c41512 @josevalim josevalim committed Nov 28, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
View
2 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -1239,7 +1239,7 @@ def extract_pg_identifier_from_name(name)
if match_data
rest = name[match_data[0].length, name.length]
rest = rest[1, rest.length] if rest.start_with? "."
- [match_data[1], (rest.any? ? rest : nil)]
+ [match_data[1], (rest.length > 0 ? rest : nil)]
end
end

2 comments on commit 89925e8

@egilburg

Is there an issue with using .any? in places like this that devs may want to know about?

@sikachu
Ruby on Rails member

Yep, look at the discussion in the original commit: 1756629

Please sign in to comment.
Something went wrong with that request. Please try again.