From 1756629835d39f60ef4c96aff81ac503c71b98b7 Mon Sep 17 00:00:00 2001 From: "Rahul P. Chaudhari" Date: Sun, 27 Nov 2011 20:02:09 +0530 Subject: Use any instead of length --- .../lib/active_record/connection_adapters/postgresql_adapter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord') 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 -- cgit v1.2.3