diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2014-12-04 11:47:22 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2014-12-04 11:47:22 +0900 |
commit | 8dcfc5d0814942edfb8bb07366fd2a57bdea3512 (patch) | |
tree | 1c208ee2780aac815b63553a40e8b077b82e9f62 /activerecord | |
parent | a83ad97f473a684417dc22fd7854ee5526e1b8ca (diff) | |
download | rails-8dcfc5d0814942edfb8bb07366fd2a57bdea3512.tar.gz rails-8dcfc5d0814942edfb8bb07366fd2a57bdea3512.tar.bz2 rails-8dcfc5d0814942edfb8bb07366fd2a57bdea3512.zip |
Prevent Symbol GC
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/finder_test.rb | 3 |
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 |