提交 28beb286 编写于 作者: R Rafael Mendonça França

Merge pull request #17906 from kamipo/prevent_symbol_gc

Prevent Symbol GC
......@@ -53,10 +53,13 @@ def test_find_passing_active_record_object_is_deprecated
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册