!RBIX 12529030924842180271 x M 1 n n x 10 __script__ i 54 5 45 0 1 7 2 64 65 49 3 0 49 4 2 47 49 5 1 15 99 7 6 45 7 8 43 9 43 10 65 49 11 3 13 99 12 7 12 12 7 13 12 65 12 49 14 4 15 49 12 0 15 2 11 I 6 I 0 I 0 I 0 n p 15 x 4 File n s 14 ../test_helper x 11 active_path x 11 expand_path x 7 require x 17 TestSoftReference x 4 Test n x 4 Unit x 8 TestCase x 10 open_class x 14 __class_init__ M 1 n n x 17 TestSoftReference i 58 5 66 99 7 0 7 1 65 67 49 2 0 49 3 4 15 99 7 4 7 5 65 67 49 2 0 49 3 4 15 99 7 6 7 7 65 67 49 2 0 49 3 4 15 99 7 8 7 9 65 67 49 2 0 49 3 4 11 I 5 I 0 I 0 I 0 n p 10 x 42 test_can_get_non_garbage_collected_objects M 1 n n x 42 test_can_get_non_garbage_collected_objects i 89 45 0 1 13 71 2 47 9 21 47 49 3 0 13 47 49 4 0 15 8 24 49 2 0 19 0 15 45 5 6 43 7 13 71 2 47 9 52 47 49 3 0 13 20 0 47 49 4 1 15 8 57 20 0 49 2 1 19 1 15 5 20 0 20 1 49 8 0 47 49 9 2 15 5 20 0 49 10 0 20 1 49 11 0 47 49 9 2 11 I 5 I 2 I 0 I 0 n p 12 x 6 Object n x 3 new x 8 allocate x 10 initialize x 3 Ref n x 13 SoftReference x 6 object x 12 assert_equal x 9 object_id x 20 referenced_object_id p 11 I -1 I 4 I 0 I 5 I 1b I 6 I 3c I 7 I 49 I 8 I 59 x 59 /Users/bdurand/dev/projects/ref/test/soft_reference_test.rb p 2 x 3 obj x 3 ref x 17 method_visibility x 15 add_defn_method x 27 test_get_the_correct_object M 1 n n x 27 test_get_the_correct_object i 38 44 43 0 78 49 1 1 19 0 15 45 2 3 7 4 64 49 5 1 7 6 64 83 7 9 30 7 8 8 32 7 9 56 10 50 11 0 11 I 3 I 1 I 0 I 0 n p 12 x 4 Hash x 16 new_from_literal x 3 ENV n s 10 QUICK_TEST x 2 [] s 4 true x 2 == I 3e8 I 186a0 M 1 p 2 x 9 for_block t n x 27 test_get_the_correct_object i 219 57 19 0 15 45 0 1 13 71 2 47 9 25 47 49 3 0 13 47 49 4 0 15 8 28 49 2 0 19 1 15 21 1 0 20 1 49 5 0 49 6 1 9 81 21 1 0 20 1 49 5 0 49 7 1 19 2 15 20 2 49 8 0 9 78 5 7 9 64 47 49 10 1 15 1 33 8 79 1 8 82 1 15 7 11 64 7 12 64 7 13 64 7 14 64 7 15 64 7 16 64 7 17 64 7 12 64 7 18 64 7 19 64 7 20 64 7 21 64 7 22 64 7 23 64 7 24 64 7 25 64 7 26 64 7 27 64 7 28 64 35 19 15 21 1 0 20 1 49 5 0 45 29 30 43 31 13 71 2 47 9 176 47 49 3 0 13 20 1 47 49 4 1 15 8 181 20 1 49 2 1 13 18 3 49 32 2 15 15 20 0 7 33 49 34 1 78 83 35 9 217 45 36 37 49 38 0 15 5 7 39 47 49 40 1 8 218 1 11 I 17 I 3 I 1 I 1 n p 41 x 6 Object n x 3 new x 8 allocate x 10 initialize x 9 object_id x 4 key? x 2 [] x 6 object s 96 soft reference found with a live reference to an object that was not the one it was created with x 5 flunk s 4 Here s 3 are s 1 a s 5 bunch s 2 of s 7 objects s 4 that s 9 allocated s 3 and s 3 can s 4 then s 2 be s 7 cleaned s 2 up s 2 by s 3 the s 7 garbage s 9 collector x 3 Ref n x 13 SoftReference x 3 []= I 3e8 x 1 % x 2 == x 2 GC n x 5 start d +0.640000000000000013322676295501878485083580017089843750 -6 x 5 sleep p 37 I 0 I 12 I 4 I 13 I 1f I 14 I 2c I 15 I 3a I 16 I 41 I 17 I 4a I 18 I 4e I 16 I 4f I 0 I 51 I 14 I 52 I 0 I 53 I 1b I 8f I 1c I bd I 1d I c9 I 1e I d0 I 1f I d9 I 1d I da I 0 I db x 59 /Users/bdurand/dev/projects/ref/test/soft_reference_test.rb p 3 x 1 i x 3 obj x 3 ref x 5 times p 9 I -1 I b I 0 I 11 I a I 12 I 20 I 12 I 26 x 59 /Users/bdurand/dev/projects/ref/test/soft_reference_test.rb p 1 x 9 id_to_ref x 45 test_references_are_not_collected_immediately M 1 n n x 45 test_references_are_not_collected_immediately i 96 45 0 1 43 2 13 71 3 47 9 47 47 49 4 0 13 45 5 6 13 71 3 47 9 37 47 49 4 0 13 47 49 7 0 15 8 40 49 3 0 47 49 7 1 15 8 74 45 5 8 13 71 3 47 9 68 47 49 4 0 13 47 49 7 0 15 8 71 49 3 0 49 3 1 19 0 15 4 9 56 9 50 10 0 15 5 20 0 49 11 0 47 49 12 1 11 I 5 I 1 I 0 I 0 n p 13 x 3 Ref n x 13 SoftReference x 3 new x 8 allocate x 6 Object n x 10 initialize n M 1 p 2 x 9 for_block t n x 45 test_references_are_not_collected_immediately i 40 7 0 64 7 1 64 7 2 64 7 3 64 7 4 64 7 5 64 35 6 19 0 15 20 0 4 100 49 6 1 19 0 15 45 7 8 49 9 0 11 I 8 I 1 I 0 I 0 I -2 p 10 s 8 allocate s 4 some s 6 memory s 2 on s 3 the s 4 heap x 1 * x 2 GC n x 5 start p 3 I 0 I 26 I 28 x 59 /Users/bdurand/dev/projects/ref/test/soft_reference_test.rb p 1 x 3 arr x 5 times x 6 object x 6 assert p 9 I -1 I 24 I 0 I 25 I 4d I 26 I 55 I 27 I 60 x 59 /Users/bdurand/dev/projects/ref/test/soft_reference_test.rb p 1 x 3 ref x 12 test_inspect M 1 n n x 12 test_inspect i 113 45 0 1 43 2 13 71 3 47 9 47 47 49 4 0 13 45 5 6 13 71 3 47 9 37 47 49 4 0 13 47 49 7 0 15 8 40 49 3 0 47 49 7 1 15 8 74 45 5 8 13 71 3 47 9 68 47 49 4 0 13 47 49 7 0 15 8 71 49 3 0 49 3 1 19 0 15 5 20 0 49 9 0 47 49 10 1 15 45 11 12 49 13 0 15 45 11 14 49 13 0 15 5 20 0 49 9 0 47 49 10 1 11 I 5 I 1 I 0 I 0 n p 15 x 3 Ref n x 13 SoftReference x 3 new x 8 allocate x 6 Object n x 10 initialize n x 7 inspect x 6 assert x 2 GC n x 5 start n p 13 I -1 I 2a I 0 I 2b I 4d I 2c I 58 I 2d I 5f I 2e I 66 I 2f I 71 x 59 /Users/bdurand/dev/projects/ref/test/soft_reference_test.rb p 1 x 3 ref p 9 I 2 I 4 I 10 I b I 1e I 24 I 2c I 2a I 3a x 59 /Users/bdurand/dev/projects/ref/test/soft_reference_test.rb p 0 x 13 attach_method p 5 I 0 I 1 I 13 I 3 I 36 x 59 /Users/bdurand/dev/projects/ref/test/soft_reference_test.rb p 0