Kouhei Sutou
kous****@users*****
2006年 11月 27日 (月) 23:10:10 JST
Index: tomoe/test/dict_spec.rb diff -u tomoe/test/dict_spec.rb:1.6 tomoe/test/dict_spec.rb:1.7 --- tomoe/test/dict_spec.rb:1.6 Mon Nov 27 16:49:18 2006 +++ tomoe/test/dict_spec.rb Mon Nov 27 23:10:10 2006 @@ -59,10 +59,16 @@ specify "should load and save" do dicts = ObjectSpace.each_object(Tomoe::Dict) {} Proc.new do - Tomoe::Dict.new(@dict_file.path, true) + Proc.new do + dict = Tomoe::Dict.new(@dict_file.path, true) + dict.modified = true + dict = nil + GC.start + end.call truncate_content nil - end + GC.start + end.call GC.start # GCed Tomoe::Dict to ensure save current_dicts = ObjectSpace.each_object(Tomoe::Dict) {}