Browse files

Merge pull request #3773 from rahul100885/rahul100885_work

Use any instead of length
  • Loading branch information...
2 parents 0b7cd7b + 1756629 commit af3aacaa47922e1c587ce626bd45fd9f452fe03f @spastorino spastorino committed Nov 27, 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.length > 0 ? rest : nil)]
+ [match_data[1], (rest.any? ? rest : nil)]
end
end

0 comments on commit af3aaca

Please sign in to comment.