From 89925e817c356c292a195c894779b55307c41512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 28 Nov 2011 11:18:39 +0100 Subject: [PATCH] Revert "Use any instead of length" This reverts commit 1756629835d39f60ef4c96aff81ac503c71b98b7. --- .../lib/active_record/connection_adapters/postgresql_adapter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 852debcdde..2f01fbb829 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.any? ? rest : nil)] + [match_data[1], (rest.length > 0 ? rest : nil)] end end