diff options
author | Rahul P. Chaudhari <rahul100885@gmail.com> | 2011-11-27 20:02:09 +0530 |
---|---|---|
committer | Rahul P. Chaudhari <rahul100885@gmail.com> | 2011-11-27 20:02:09 +0530 |
commit | 1756629835d39f60ef4c96aff81ac503c71b98b7 (patch) | |
tree | 63ebf31ef281b066a32cc5ccaf4c3d2f1ac23d0f /activerecord | |
parent | 3c81fc3b91ddfd4d115a7001640588eb93249261 (diff) | |
download | rails-1756629835d39f60ef4c96aff81ac503c71b98b7.tar.gz rails-1756629835d39f60ef4c96aff81ac503c71b98b7.tar.bz2 rails-1756629835d39f60ef4c96aff81ac503c71b98b7.zip |
Use any instead of length
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 2f01fbb829..852debcdde 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -1239,7 +1239,7 @@ module ActiveRecord 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 |