ref 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT_LICENSE +1 -1
- data/README.rdoc +5 -0
- data/VERSION +1 -1
- data/lib/ref.rb +23 -17
- data/lib/ref/weak_reference/pure_ruby.rb +9 -2
- data/test/mock_test.rbc +856 -0
- data/test/reference_key_map_behavior.rbc +147 -202
- data/test/reference_queue_test.rbc +75 -91
- data/test/reference_value_map_behavior.rbc +128 -183
- data/test/soft_key_map_test.rbc +32 -75
- data/test/soft_reference_test.rbc +81 -81
- data/test/soft_value_map_test.rbc +32 -75
- data/test/strong_reference_test.rbc +35 -51
- data/test/test_helper.rbc +143 -0
- data/test/weak_key_map_test.rbc +32 -75
- data/test/weak_reference_test.rb +10 -0
- data/test/weak_reference_test.rbc +337 -81
- data/test/weak_value_map_test.rbc +32 -75
- metadata +6 -4
data/test/soft_key_map_test.rbc
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
!RBIX
|
2
|
-
|
2
|
+
12529030924842180271
|
3
3
|
x
|
4
4
|
M
|
5
5
|
1
|
@@ -9,85 +9,57 @@ x
|
|
9
9
|
10
|
10
10
|
__script__
|
11
11
|
i
|
12
|
-
|
13
|
-
5
|
14
|
-
7
|
15
|
-
0
|
16
|
-
64
|
17
|
-
47
|
18
|
-
49
|
19
|
-
1
|
20
|
-
1
|
21
|
-
15
|
12
|
+
54
|
22
13
|
5
|
23
14
|
45
|
24
|
-
2
|
25
|
-
3
|
26
|
-
7
|
27
|
-
4
|
28
|
-
64
|
29
|
-
65
|
30
|
-
49
|
31
|
-
5
|
32
15
|
0
|
33
|
-
49
|
34
|
-
6
|
35
|
-
2
|
36
|
-
47
|
37
|
-
49
|
38
|
-
1
|
39
16
|
1
|
40
|
-
15
|
41
|
-
5
|
42
|
-
45
|
43
|
-
2
|
44
17
|
7
|
45
|
-
|
46
|
-
8
|
18
|
+
2
|
47
19
|
64
|
48
20
|
65
|
49
21
|
49
|
50
|
-
|
22
|
+
3
|
51
23
|
0
|
52
24
|
49
|
53
|
-
|
25
|
+
4
|
54
26
|
2
|
55
27
|
47
|
56
28
|
49
|
57
|
-
|
29
|
+
5
|
58
30
|
1
|
59
31
|
15
|
60
32
|
99
|
61
33
|
7
|
62
|
-
|
34
|
+
6
|
63
35
|
45
|
64
|
-
|
65
|
-
|
36
|
+
7
|
37
|
+
8
|
66
38
|
43
|
67
|
-
|
39
|
+
9
|
68
40
|
43
|
69
|
-
|
41
|
+
10
|
70
42
|
65
|
71
43
|
49
|
72
|
-
|
44
|
+
11
|
73
45
|
3
|
74
46
|
13
|
75
47
|
99
|
76
48
|
12
|
77
49
|
7
|
78
|
-
|
50
|
+
12
|
79
51
|
12
|
80
52
|
7
|
81
|
-
|
53
|
+
13
|
82
54
|
12
|
83
55
|
65
|
84
56
|
12
|
85
57
|
49
|
86
|
-
|
58
|
+
14
|
87
59
|
4
|
88
60
|
15
|
89
61
|
49
|
90
|
-
|
62
|
+
12
|
91
63
|
0
|
92
64
|
15
|
93
65
|
2
|
@@ -102,30 +74,23 @@ I
|
|
102
74
|
0
|
103
75
|
n
|
104
76
|
p
|
105
|
-
|
106
|
-
s
|
107
|
-
9
|
108
|
-
test/unit
|
109
|
-
x
|
110
|
-
7
|
111
|
-
require
|
77
|
+
15
|
112
78
|
x
|
113
79
|
4
|
114
80
|
File
|
115
81
|
n
|
116
82
|
s
|
117
|
-
|
118
|
-
|
83
|
+
14
|
84
|
+
../test_helper
|
119
85
|
x
|
120
86
|
11
|
121
87
|
active_path
|
122
88
|
x
|
123
89
|
11
|
124
90
|
expand_path
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
../reference_key_map_behavior
|
91
|
+
x
|
92
|
+
7
|
93
|
+
require
|
129
94
|
x
|
130
95
|
14
|
131
96
|
TestSoftKeyMap
|
@@ -252,11 +217,11 @@ p
|
|
252
217
|
I
|
253
218
|
-1
|
254
219
|
I
|
255
|
-
|
220
|
+
6
|
256
221
|
I
|
257
222
|
0
|
258
223
|
I
|
259
|
-
|
224
|
+
7
|
260
225
|
I
|
261
226
|
6
|
262
227
|
x
|
@@ -311,11 +276,11 @@ p
|
|
311
276
|
I
|
312
277
|
-1
|
313
278
|
I
|
314
|
-
|
279
|
+
a
|
315
280
|
I
|
316
281
|
0
|
317
282
|
I
|
318
|
-
|
283
|
+
b
|
319
284
|
I
|
320
285
|
6
|
321
286
|
x
|
@@ -328,15 +293,15 @@ p
|
|
328
293
|
I
|
329
294
|
2
|
330
295
|
I
|
331
|
-
|
296
|
+
4
|
332
297
|
I
|
333
298
|
b
|
334
299
|
I
|
335
|
-
|
300
|
+
6
|
336
301
|
I
|
337
302
|
19
|
338
303
|
I
|
339
|
-
|
304
|
+
a
|
340
305
|
I
|
341
306
|
27
|
342
307
|
x
|
@@ -348,25 +313,17 @@ x
|
|
348
313
|
13
|
349
314
|
attach_method
|
350
315
|
p
|
351
|
-
|
316
|
+
5
|
352
317
|
I
|
353
318
|
0
|
354
319
|
I
|
355
320
|
1
|
356
321
|
I
|
357
|
-
|
358
|
-
I
|
359
|
-
2
|
360
|
-
I
|
361
|
-
1c
|
322
|
+
13
|
362
323
|
I
|
363
324
|
3
|
364
325
|
I
|
365
|
-
|
366
|
-
I
|
367
|
-
5
|
368
|
-
I
|
369
|
-
52
|
326
|
+
36
|
370
327
|
x
|
371
328
|
57
|
372
329
|
/Users/bdurand/dev/projects/ref/test/soft_key_map_test.rb
|
@@ -1,5 +1,5 @@
|
|
1
1
|
!RBIX
|
2
|
-
|
2
|
+
12529030924842180271
|
3
3
|
x
|
4
4
|
M
|
5
5
|
1
|
@@ -9,66 +9,57 @@ x
|
|
9
9
|
10
|
10
10
|
__script__
|
11
11
|
i
|
12
|
-
|
12
|
+
54
|
13
13
|
5
|
14
|
-
|
14
|
+
45
|
15
15
|
0
|
16
|
-
64
|
17
|
-
47
|
18
|
-
49
|
19
|
-
1
|
20
16
|
1
|
21
|
-
15
|
22
|
-
5
|
23
|
-
45
|
24
|
-
2
|
25
|
-
3
|
26
17
|
7
|
27
|
-
|
18
|
+
2
|
28
19
|
64
|
29
20
|
65
|
30
21
|
49
|
31
|
-
|
22
|
+
3
|
32
23
|
0
|
33
24
|
49
|
34
|
-
|
25
|
+
4
|
35
26
|
2
|
36
27
|
47
|
37
28
|
49
|
38
|
-
|
29
|
+
5
|
39
30
|
1
|
40
31
|
15
|
41
32
|
99
|
42
33
|
7
|
43
|
-
|
34
|
+
6
|
44
35
|
45
|
36
|
+
7
|
45
37
|
8
|
38
|
+
43
|
46
39
|
9
|
47
40
|
43
|
48
41
|
10
|
49
|
-
43
|
50
|
-
11
|
51
42
|
65
|
52
43
|
49
|
53
|
-
|
44
|
+
11
|
54
45
|
3
|
55
46
|
13
|
56
47
|
99
|
57
48
|
12
|
58
49
|
7
|
59
|
-
|
50
|
+
12
|
60
51
|
12
|
61
52
|
7
|
62
|
-
|
53
|
+
13
|
63
54
|
12
|
64
55
|
65
|
65
56
|
12
|
66
57
|
49
|
67
|
-
|
58
|
+
14
|
68
59
|
4
|
69
60
|
15
|
70
61
|
49
|
71
|
-
|
62
|
+
12
|
72
63
|
0
|
73
64
|
15
|
74
65
|
2
|
@@ -83,20 +74,14 @@ I
|
|
83
74
|
0
|
84
75
|
n
|
85
76
|
p
|
86
|
-
|
87
|
-
s
|
88
|
-
9
|
89
|
-
test/unit
|
90
|
-
x
|
91
|
-
7
|
92
|
-
require
|
77
|
+
15
|
93
78
|
x
|
94
79
|
4
|
95
80
|
File
|
96
81
|
n
|
97
82
|
s
|
98
|
-
|
99
|
-
|
83
|
+
14
|
84
|
+
../test_helper
|
100
85
|
x
|
101
86
|
11
|
102
87
|
active_path
|
@@ -104,6 +89,9 @@ x
|
|
104
89
|
11
|
105
90
|
expand_path
|
106
91
|
x
|
92
|
+
7
|
93
|
+
require
|
94
|
+
x
|
107
95
|
17
|
108
96
|
TestSoftReference
|
109
97
|
x
|
@@ -349,23 +337,23 @@ p
|
|
349
337
|
I
|
350
338
|
-1
|
351
339
|
I
|
352
|
-
|
340
|
+
4
|
353
341
|
I
|
354
342
|
0
|
355
343
|
I
|
356
|
-
|
344
|
+
5
|
357
345
|
I
|
358
346
|
1b
|
359
347
|
I
|
360
|
-
|
348
|
+
6
|
361
349
|
I
|
362
350
|
3c
|
363
351
|
I
|
364
|
-
|
352
|
+
7
|
365
353
|
I
|
366
354
|
49
|
367
355
|
I
|
368
|
-
|
356
|
+
8
|
369
357
|
I
|
370
358
|
59
|
371
359
|
x
|
@@ -832,67 +820,79 @@ x
|
|
832
820
|
5
|
833
821
|
sleep
|
834
822
|
p
|
835
|
-
|
823
|
+
37
|
836
824
|
I
|
837
825
|
0
|
838
826
|
I
|
839
|
-
|
827
|
+
12
|
840
828
|
I
|
841
829
|
4
|
842
830
|
I
|
843
|
-
|
831
|
+
13
|
844
832
|
I
|
845
833
|
1f
|
846
834
|
I
|
847
|
-
|
835
|
+
14
|
848
836
|
I
|
849
837
|
2c
|
850
838
|
I
|
851
|
-
|
839
|
+
15
|
852
840
|
I
|
853
841
|
3a
|
854
842
|
I
|
855
|
-
|
843
|
+
16
|
856
844
|
I
|
857
845
|
41
|
858
846
|
I
|
859
|
-
|
847
|
+
17
|
860
848
|
I
|
861
849
|
4a
|
862
850
|
I
|
863
|
-
|
851
|
+
18
|
864
852
|
I
|
865
853
|
4e
|
866
854
|
I
|
867
|
-
|
855
|
+
16
|
856
|
+
I
|
857
|
+
4f
|
858
|
+
I
|
859
|
+
0
|
868
860
|
I
|
869
861
|
51
|
870
862
|
I
|
871
|
-
|
863
|
+
14
|
864
|
+
I
|
865
|
+
52
|
866
|
+
I
|
867
|
+
0
|
872
868
|
I
|
873
869
|
53
|
874
870
|
I
|
875
|
-
|
871
|
+
1b
|
876
872
|
I
|
877
873
|
8f
|
878
874
|
I
|
879
|
-
|
875
|
+
1c
|
880
876
|
I
|
881
877
|
bd
|
882
878
|
I
|
883
|
-
|
879
|
+
1d
|
884
880
|
I
|
885
881
|
c9
|
886
882
|
I
|
887
|
-
|
883
|
+
1e
|
888
884
|
I
|
889
885
|
d0
|
890
886
|
I
|
891
|
-
|
887
|
+
1f
|
892
888
|
I
|
893
889
|
d9
|
894
890
|
I
|
895
|
-
|
891
|
+
1d
|
892
|
+
I
|
893
|
+
da
|
894
|
+
I
|
895
|
+
0
|
896
896
|
I
|
897
897
|
db
|
898
898
|
x
|
@@ -913,19 +913,23 @@ x
|
|
913
913
|
5
|
914
914
|
times
|
915
915
|
p
|
916
|
-
|
916
|
+
9
|
917
917
|
I
|
918
918
|
-1
|
919
919
|
I
|
920
|
-
|
920
|
+
b
|
921
921
|
I
|
922
922
|
0
|
923
923
|
I
|
924
|
-
|
924
|
+
11
|
925
925
|
I
|
926
926
|
a
|
927
927
|
I
|
928
|
-
|
928
|
+
12
|
929
|
+
I
|
930
|
+
20
|
931
|
+
I
|
932
|
+
12
|
929
933
|
I
|
930
934
|
26
|
931
935
|
x
|
@@ -1175,7 +1179,7 @@ p
|
|
1175
1179
|
I
|
1176
1180
|
0
|
1177
1181
|
I
|
1178
|
-
|
1182
|
+
26
|
1179
1183
|
I
|
1180
1184
|
28
|
1181
1185
|
x
|
@@ -1200,19 +1204,19 @@ p
|
|
1200
1204
|
I
|
1201
1205
|
-1
|
1202
1206
|
I
|
1203
|
-
|
1207
|
+
24
|
1204
1208
|
I
|
1205
1209
|
0
|
1206
1210
|
I
|
1207
|
-
|
1211
|
+
25
|
1208
1212
|
I
|
1209
1213
|
4d
|
1210
1214
|
I
|
1211
|
-
|
1215
|
+
26
|
1212
1216
|
I
|
1213
1217
|
55
|
1214
1218
|
I
|
1215
|
-
|
1219
|
+
27
|
1216
1220
|
I
|
1217
1221
|
60
|
1218
1222
|
x
|
@@ -1399,27 +1403,27 @@ p
|
|
1399
1403
|
I
|
1400
1404
|
-1
|
1401
1405
|
I
|
1402
|
-
|
1406
|
+
2a
|
1403
1407
|
I
|
1404
1408
|
0
|
1405
1409
|
I
|
1406
|
-
|
1410
|
+
2b
|
1407
1411
|
I
|
1408
1412
|
4d
|
1409
1413
|
I
|
1410
|
-
|
1414
|
+
2c
|
1411
1415
|
I
|
1412
1416
|
58
|
1413
1417
|
I
|
1414
|
-
|
1418
|
+
2d
|
1415
1419
|
I
|
1416
1420
|
5f
|
1417
1421
|
I
|
1418
|
-
|
1422
|
+
2e
|
1419
1423
|
I
|
1420
1424
|
66
|
1421
1425
|
I
|
1422
|
-
|
1426
|
+
2f
|
1423
1427
|
I
|
1424
1428
|
71
|
1425
1429
|
x
|
@@ -1435,19 +1439,19 @@ p
|
|
1435
1439
|
I
|
1436
1440
|
2
|
1437
1441
|
I
|
1438
|
-
|
1442
|
+
4
|
1439
1443
|
I
|
1440
1444
|
10
|
1441
1445
|
I
|
1442
|
-
|
1446
|
+
b
|
1443
1447
|
I
|
1444
1448
|
1e
|
1445
1449
|
I
|
1446
|
-
|
1450
|
+
24
|
1447
1451
|
I
|
1448
1452
|
2c
|
1449
1453
|
I
|
1450
|
-
|
1454
|
+
2a
|
1451
1455
|
I
|
1452
1456
|
3a
|
1453
1457
|
x
|
@@ -1459,21 +1463,17 @@ x
|
|
1459
1463
|
13
|
1460
1464
|
attach_method
|
1461
1465
|
p
|
1462
|
-
|
1466
|
+
5
|
1463
1467
|
I
|
1464
1468
|
0
|
1465
1469
|
I
|
1466
1470
|
1
|
1467
1471
|
I
|
1468
|
-
|
1469
|
-
I
|
1470
|
-
2
|
1471
|
-
I
|
1472
|
-
1c
|
1472
|
+
13
|
1473
1473
|
I
|
1474
|
-
|
1474
|
+
3
|
1475
1475
|
I
|
1476
|
-
|
1476
|
+
36
|
1477
1477
|
x
|
1478
1478
|
59
|
1479
1479
|
/Users/bdurand/dev/projects/ref/test/soft_reference_test.rb
|