aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/test/cases/finder_test.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb
index f24b30c685..d4272bb9d1 100644
--- a/activerecord/test/cases/finder_test.rb
+++ b/activerecord/test/cases/finder_test.rb
@@ -53,10 +53,13 @@ class FinderTest < ActiveRecord::TestCase
end
def test_symbols_table_ref
+ gc_disabled = GC.disable if RUBY_VERSION >= '2.2.0'
Post.where("author_id" => nil) # warm up
x = Symbol.all_symbols.count
Post.where("title" => {"xxxqqqq" => "bar"})
assert_equal x, Symbol.all_symbols.count
+ ensure
+ GC.enable if gc_disabled == false
end
# find should handle strings that come from URLs