From 792a2a486acc86bacd6a86258f38c2a434eba845 Mon Sep 17 00:00:00 2001 From: Stuart Zilm Date: Mon, 30 Aug 2010 11:08:10 -0400 Subject: [PATCH] Horrible workaround for instantiation side effect of ruby-1.9.2-p0 method_missing to_ary [#5489] --- activerecord/lib/active_record/base.rb | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 0699c87..2569117 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1867,6 +1867,9 @@ module ActiveRecord #:nodoc: # Each dynamic finder, scope or initializer/creator is also defined in the class after it is first invoked, so that future # attempts to use it do not run through method_missing. def method_missing(method_id, *arguments, &block) + if method_id == :to_ary + Object.method_missing method_id, arguments + end if match = DynamicFinderMatch.match(method_id) attribute_names = match.attribute_names super unless all_attributes_exists?(attribute_names) -- 1.7.0.4