aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/CHANGELOG2
-rwxr-xr-xactiverecord/lib/active_record.rb1
-rw-r--r--activerecord/lib/active_record/query_cache.rb2
-rw-r--r--activerecord/test/query_cache_test.rb4
4 files changed, 6 insertions, 3 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index 768dfe93ac..8408b44672 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Explicitly require active_record/query_cache before using it. [Jeremy Kemper]
+
* Fix bug where unserializing an attribute attempts to modify a frozen @attributes hash for a deleted record. [Rick, marclove]
* Performance: absorb instantiate and initialize_with_callbacks into the Base methods. [Jeremy Kemper]
diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb
index 7dd89d86d0..9b391bf868 100755
--- a/activerecord/lib/active_record.rb
+++ b/activerecord/lib/active_record.rb
@@ -75,5 +75,4 @@ end
require 'active_record/connection_adapters/abstract_adapter'
-require 'active_record/query_cache'
require 'active_record/schema_dumper'
diff --git a/activerecord/lib/active_record/query_cache.rb b/activerecord/lib/active_record/query_cache.rb
index e598de07e2..1b15f92284 100644
--- a/activerecord/lib/active_record/query_cache.rb
+++ b/activerecord/lib/active_record/query_cache.rb
@@ -62,7 +62,7 @@ module ActiveRecord
case result
when Array
result.collect { |row| row.dup }
- when Numeric, NilClass, FalseClass
+ when Fixnum, NilClass, FalseClass
result
else
result.dup
diff --git a/activerecord/test/query_cache_test.rb b/activerecord/test/query_cache_test.rb
index 8c8ae69776..d63df6141d 100644
--- a/activerecord/test/query_cache_test.rb
+++ b/activerecord/test/query_cache_test.rb
@@ -4,6 +4,8 @@ require 'fixtures/reply'
require 'fixtures/task'
require 'fixtures/course'
+require 'active_record/query_cache'
+
class QueryCacheTest < Test::Unit::TestCase
fixtures :tasks
@@ -117,4 +119,4 @@ class QueryCacheExpiryTest < Test::Unit::TestCase
end
end
-end \ No newline at end of file
+end