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
@@ -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
16
|
1
|
39
|
-
1
|
40
|
-
15
|
41
|
-
5
|
42
|
-
45
|
43
|
-
2
|
44
|
-
7
|
45
17
|
7
|
46
|
-
|
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_value_map_behavior
|
91
|
+
x
|
92
|
+
7
|
93
|
+
require
|
129
94
|
x
|
130
95
|
16
|
131
96
|
TestSoftValueMap
|
@@ -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
|
59
|
372
329
|
/Users/bdurand/dev/projects/ref/test/soft_value_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
|
19
|
108
96
|
TestStrongReference
|
109
97
|
x
|
@@ -321,23 +309,23 @@ p
|
|
321
309
|
I
|
322
310
|
-1
|
323
311
|
I
|
324
|
-
|
312
|
+
4
|
325
313
|
I
|
326
314
|
0
|
327
315
|
I
|
328
|
-
|
316
|
+
5
|
329
317
|
I
|
330
318
|
1b
|
331
319
|
I
|
332
|
-
|
320
|
+
6
|
333
321
|
I
|
334
322
|
3c
|
335
323
|
I
|
336
|
-
|
324
|
+
7
|
337
325
|
I
|
338
326
|
49
|
339
327
|
I
|
340
|
-
|
328
|
+
8
|
341
329
|
I
|
342
330
|
59
|
343
331
|
x
|
@@ -500,15 +488,15 @@ p
|
|
500
488
|
I
|
501
489
|
-1
|
502
490
|
I
|
503
|
-
|
491
|
+
b
|
504
492
|
I
|
505
493
|
0
|
506
494
|
I
|
507
|
-
|
495
|
+
c
|
508
496
|
I
|
509
497
|
4d
|
510
498
|
I
|
511
|
-
|
499
|
+
d
|
512
500
|
I
|
513
501
|
58
|
514
502
|
x
|
@@ -524,11 +512,11 @@ p
|
|
524
512
|
I
|
525
513
|
2
|
526
514
|
I
|
527
|
-
|
515
|
+
4
|
528
516
|
I
|
529
517
|
10
|
530
518
|
I
|
531
|
-
|
519
|
+
b
|
532
520
|
I
|
533
521
|
1e
|
534
522
|
x
|
@@ -540,21 +528,17 @@ x
|
|
540
528
|
13
|
541
529
|
attach_method
|
542
530
|
p
|
543
|
-
|
531
|
+
5
|
544
532
|
I
|
545
533
|
0
|
546
534
|
I
|
547
535
|
1
|
548
536
|
I
|
549
|
-
|
550
|
-
I
|
551
|
-
2
|
552
|
-
I
|
553
|
-
1c
|
537
|
+
13
|
554
538
|
I
|
555
|
-
|
539
|
+
3
|
556
540
|
I
|
557
|
-
|
541
|
+
36
|
558
542
|
x
|
559
543
|
61
|
560
544
|
/Users/bdurand/dev/projects/ref/test/strong_reference_test.rb
|
@@ -0,0 +1,143 @@
|
|
1
|
+
!RBIX
|
2
|
+
12529030924842180271
|
3
|
+
x
|
4
|
+
M
|
5
|
+
1
|
6
|
+
n
|
7
|
+
n
|
8
|
+
x
|
9
|
+
10
|
10
|
+
__script__
|
11
|
+
i
|
12
|
+
68
|
13
|
+
5
|
14
|
+
7
|
15
|
+
0
|
16
|
+
64
|
17
|
+
47
|
18
|
+
49
|
19
|
+
1
|
20
|
+
1
|
21
|
+
15
|
22
|
+
5
|
23
|
+
45
|
24
|
+
2
|
25
|
+
3
|
26
|
+
7
|
27
|
+
4
|
28
|
+
64
|
29
|
+
65
|
30
|
+
49
|
31
|
+
5
|
32
|
+
0
|
33
|
+
49
|
34
|
+
6
|
35
|
+
2
|
36
|
+
47
|
37
|
+
49
|
38
|
+
1
|
39
|
+
1
|
40
|
+
15
|
41
|
+
5
|
42
|
+
45
|
43
|
+
2
|
44
|
+
7
|
45
|
+
7
|
46
|
+
8
|
47
|
+
64
|
48
|
+
65
|
49
|
+
49
|
50
|
+
5
|
51
|
+
0
|
52
|
+
49
|
53
|
+
6
|
54
|
+
2
|
55
|
+
47
|
56
|
+
49
|
57
|
+
1
|
58
|
+
1
|
59
|
+
15
|
60
|
+
5
|
61
|
+
45
|
62
|
+
2
|
63
|
+
9
|
64
|
+
7
|
65
|
+
10
|
66
|
+
64
|
67
|
+
65
|
68
|
+
49
|
69
|
+
5
|
70
|
+
0
|
71
|
+
49
|
72
|
+
6
|
73
|
+
2
|
74
|
+
47
|
75
|
+
49
|
76
|
+
1
|
77
|
+
1
|
78
|
+
15
|
79
|
+
2
|
80
|
+
11
|
81
|
+
I
|
82
|
+
4
|
83
|
+
I
|
84
|
+
0
|
85
|
+
I
|
86
|
+
0
|
87
|
+
I
|
88
|
+
0
|
89
|
+
n
|
90
|
+
p
|
91
|
+
11
|
92
|
+
s
|
93
|
+
9
|
94
|
+
test/unit
|
95
|
+
x
|
96
|
+
7
|
97
|
+
require
|
98
|
+
x
|
99
|
+
4
|
100
|
+
File
|
101
|
+
n
|
102
|
+
s
|
103
|
+
13
|
104
|
+
../../lib/ref
|
105
|
+
x
|
106
|
+
11
|
107
|
+
active_path
|
108
|
+
x
|
109
|
+
11
|
110
|
+
expand_path
|
111
|
+
n
|
112
|
+
s
|
113
|
+
29
|
114
|
+
../reference_key_map_behavior
|
115
|
+
n
|
116
|
+
s
|
117
|
+
31
|
118
|
+
../reference_value_map_behavior
|
119
|
+
p
|
120
|
+
9
|
121
|
+
I
|
122
|
+
0
|
123
|
+
I
|
124
|
+
1
|
125
|
+
I
|
126
|
+
9
|
127
|
+
I
|
128
|
+
2
|
129
|
+
I
|
130
|
+
1c
|
131
|
+
I
|
132
|
+
3
|
133
|
+
I
|
134
|
+
2f
|
135
|
+
I
|
136
|
+
4
|
137
|
+
I
|
138
|
+
44
|
139
|
+
x
|
140
|
+
51
|
141
|
+
/Users/bdurand/dev/projects/ref/test/test_helper.rb
|
142
|
+
p
|
143
|
+
0
|