ref 1.0.5 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +41 -0
  3. data/lib/ref.rb +28 -29
  4. data/lib/ref/abstract_reference_key_map.rb +72 -28
  5. data/lib/ref/abstract_reference_value_map.rb +61 -18
  6. data/lib/ref/reference_queue.rb +8 -8
  7. data/lib/ref/soft_reference.rb +7 -7
  8. data/lib/ref/version.rb +3 -0
  9. data/lib/ref/weak_reference/pure_ruby.rb +9 -9
  10. data/lib/ref_ext.jar +0 -0
  11. metadata +23 -49
  12. data/README.rdoc +0 -40
  13. data/VERSION +0 -1
  14. data/lib/org/jruby/ext/ref/references.jar +0 -0
  15. data/lib/ref/mock.rb +0 -150
  16. data/lib/ref/safe_monitor.rb +0 -50
  17. data/lib/ref/weak_reference/iron_ruby.rb +0 -14
  18. data/test/mock_test.rb +0 -33
  19. data/test/mock_test.rbc +0 -856
  20. data/test/reference_key_map_behavior.rb +0 -155
  21. data/test/reference_key_map_behavior.rbc +0 -4241
  22. data/test/reference_queue_test.rb +0 -60
  23. data/test/reference_queue_test.rbc +0 -1938
  24. data/test/reference_value_map_behavior.rb +0 -135
  25. data/test/reference_value_map_behavior.rbc +0 -3560
  26. data/test/soft_key_map_test.rb +0 -13
  27. data/test/soft_key_map_test.rbc +0 -331
  28. data/test/soft_reference_test.rb +0 -49
  29. data/test/soft_reference_test.rbc +0 -1481
  30. data/test/soft_value_map_test.rb +0 -13
  31. data/test/soft_value_map_test.rbc +0 -331
  32. data/test/strong_reference_test.rb +0 -15
  33. data/test/strong_reference_test.rbc +0 -546
  34. data/test/test_helper.rb +0 -4
  35. data/test/test_helper.rbc +0 -143
  36. data/test/weak_key_map_test.rb +0 -13
  37. data/test/weak_key_map_test.rbc +0 -331
  38. data/test/weak_reference_test.rb +0 -54
  39. data/test/weak_reference_test.rbc +0 -1510
  40. data/test/weak_value_map_test.rb +0 -13
  41. data/test/weak_value_map_test.rbc +0 -331
@@ -1,13 +0,0 @@
1
- require File.expand_path("../test_helper", __FILE__)
2
-
3
- class TestSoftValueMap < Test::Unit::TestCase
4
- include ReferenceValueMapBehavior
5
-
6
- def map_class
7
- Ref::SoftValueMap
8
- end
9
-
10
- def reference_class
11
- Ref::SoftReference
12
- end
13
- end
@@ -1,331 +0,0 @@
1
- !RBIX
2
- 12529030924842180271
3
- x
4
- M
5
- 1
6
- n
7
- n
8
- x
9
- 10
10
- __script__
11
- i
12
- 54
13
- 5
14
- 45
15
- 0
16
- 1
17
- 7
18
- 2
19
- 64
20
- 65
21
- 49
22
- 3
23
- 0
24
- 49
25
- 4
26
- 2
27
- 47
28
- 49
29
- 5
30
- 1
31
- 15
32
- 99
33
- 7
34
- 6
35
- 45
36
- 7
37
- 8
38
- 43
39
- 9
40
- 43
41
- 10
42
- 65
43
- 49
44
- 11
45
- 3
46
- 13
47
- 99
48
- 12
49
- 7
50
- 12
51
- 12
52
- 7
53
- 13
54
- 12
55
- 65
56
- 12
57
- 49
58
- 14
59
- 4
60
- 15
61
- 49
62
- 12
63
- 0
64
- 15
65
- 2
66
- 11
67
- I
68
- 6
69
- I
70
- 0
71
- I
72
- 0
73
- I
74
- 0
75
- n
76
- p
77
- 15
78
- x
79
- 4
80
- File
81
- n
82
- s
83
- 14
84
- ../test_helper
85
- x
86
- 11
87
- active_path
88
- x
89
- 11
90
- expand_path
91
- x
92
- 7
93
- require
94
- x
95
- 16
96
- TestSoftValueMap
97
- x
98
- 4
99
- Test
100
- n
101
- x
102
- 4
103
- Unit
104
- x
105
- 8
106
- TestCase
107
- x
108
- 10
109
- open_class
110
- x
111
- 14
112
- __class_init__
113
- M
114
- 1
115
- n
116
- n
117
- x
118
- 16
119
- TestSoftValueMap
120
- i
121
- 39
122
- 5
123
- 66
124
- 5
125
- 45
126
- 0
127
- 1
128
- 47
129
- 49
130
- 2
131
- 1
132
- 15
133
- 99
134
- 7
135
- 3
136
- 7
137
- 4
138
- 65
139
- 67
140
- 49
141
- 5
142
- 0
143
- 49
144
- 6
145
- 4
146
- 15
147
- 99
148
- 7
149
- 7
150
- 7
151
- 8
152
- 65
153
- 67
154
- 49
155
- 5
156
- 0
157
- 49
158
- 6
159
- 4
160
- 11
161
- I
162
- 5
163
- I
164
- 0
165
- I
166
- 0
167
- I
168
- 0
169
- n
170
- p
171
- 9
172
- x
173
- 25
174
- ReferenceValueMapBehavior
175
- n
176
- x
177
- 7
178
- include
179
- x
180
- 9
181
- map_class
182
- M
183
- 1
184
- n
185
- n
186
- x
187
- 9
188
- map_class
189
- i
190
- 6
191
- 45
192
- 0
193
- 1
194
- 43
195
- 2
196
- 11
197
- I
198
- 1
199
- I
200
- 0
201
- I
202
- 0
203
- I
204
- 0
205
- n
206
- p
207
- 3
208
- x
209
- 3
210
- Ref
211
- n
212
- x
213
- 12
214
- SoftValueMap
215
- p
216
- 5
217
- I
218
- -1
219
- I
220
- 6
221
- I
222
- 0
223
- I
224
- 7
225
- I
226
- 6
227
- x
228
- 59
229
- /Users/bdurand/dev/projects/ref/test/soft_value_map_test.rb
230
- p
231
- 0
232
- x
233
- 17
234
- method_visibility
235
- x
236
- 15
237
- add_defn_method
238
- x
239
- 15
240
- reference_class
241
- M
242
- 1
243
- n
244
- n
245
- x
246
- 15
247
- reference_class
248
- i
249
- 6
250
- 45
251
- 0
252
- 1
253
- 43
254
- 2
255
- 11
256
- I
257
- 1
258
- I
259
- 0
260
- I
261
- 0
262
- I
263
- 0
264
- n
265
- p
266
- 3
267
- x
268
- 3
269
- Ref
270
- n
271
- x
272
- 13
273
- SoftReference
274
- p
275
- 5
276
- I
277
- -1
278
- I
279
- a
280
- I
281
- 0
282
- I
283
- b
284
- I
285
- 6
286
- x
287
- 59
288
- /Users/bdurand/dev/projects/ref/test/soft_value_map_test.rb
289
- p
290
- 0
291
- p
292
- 7
293
- I
294
- 2
295
- I
296
- 4
297
- I
298
- b
299
- I
300
- 6
301
- I
302
- 19
303
- I
304
- a
305
- I
306
- 27
307
- x
308
- 59
309
- /Users/bdurand/dev/projects/ref/test/soft_value_map_test.rb
310
- p
311
- 0
312
- x
313
- 13
314
- attach_method
315
- p
316
- 5
317
- I
318
- 0
319
- I
320
- 1
321
- I
322
- 13
323
- I
324
- 3
325
- I
326
- 36
327
- x
328
- 59
329
- /Users/bdurand/dev/projects/ref/test/soft_value_map_test.rb
330
- p
331
- 0
@@ -1,15 +0,0 @@
1
- require File.expand_path("../test_helper", __FILE__)
2
-
3
- class TestStrongReference < Test::Unit::TestCase
4
- def test_can_get_objects
5
- obj = Object.new
6
- ref = Ref::StrongReference.new(obj)
7
- assert_equal obj, ref.object
8
- assert_equal obj.object_id, ref.referenced_object_id
9
- end
10
-
11
- def test_inspect
12
- ref = Ref::WeakReference.new(Object.new)
13
- assert ref.inspect
14
- end
15
- end
@@ -1,546 +0,0 @@
1
- !RBIX
2
- 12529030924842180271
3
- x
4
- M
5
- 1
6
- n
7
- n
8
- x
9
- 10
10
- __script__
11
- i
12
- 54
13
- 5
14
- 45
15
- 0
16
- 1
17
- 7
18
- 2
19
- 64
20
- 65
21
- 49
22
- 3
23
- 0
24
- 49
25
- 4
26
- 2
27
- 47
28
- 49
29
- 5
30
- 1
31
- 15
32
- 99
33
- 7
34
- 6
35
- 45
36
- 7
37
- 8
38
- 43
39
- 9
40
- 43
41
- 10
42
- 65
43
- 49
44
- 11
45
- 3
46
- 13
47
- 99
48
- 12
49
- 7
50
- 12
51
- 12
52
- 7
53
- 13
54
- 12
55
- 65
56
- 12
57
- 49
58
- 14
59
- 4
60
- 15
61
- 49
62
- 12
63
- 0
64
- 15
65
- 2
66
- 11
67
- I
68
- 6
69
- I
70
- 0
71
- I
72
- 0
73
- I
74
- 0
75
- n
76
- p
77
- 15
78
- x
79
- 4
80
- File
81
- n
82
- s
83
- 14
84
- ../test_helper
85
- x
86
- 11
87
- active_path
88
- x
89
- 11
90
- expand_path
91
- x
92
- 7
93
- require
94
- x
95
- 19
96
- TestStrongReference
97
- x
98
- 4
99
- Test
100
- n
101
- x
102
- 4
103
- Unit
104
- x
105
- 8
106
- TestCase
107
- x
108
- 10
109
- open_class
110
- x
111
- 14
112
- __class_init__
113
- M
114
- 1
115
- n
116
- n
117
- x
118
- 19
119
- TestStrongReference
120
- i
121
- 30
122
- 5
123
- 66
124
- 99
125
- 7
126
- 0
127
- 7
128
- 1
129
- 65
130
- 67
131
- 49
132
- 2
133
- 0
134
- 49
135
- 3
136
- 4
137
- 15
138
- 99
139
- 7
140
- 4
141
- 7
142
- 5
143
- 65
144
- 67
145
- 49
146
- 2
147
- 0
148
- 49
149
- 3
150
- 4
151
- 11
152
- I
153
- 5
154
- I
155
- 0
156
- I
157
- 0
158
- I
159
- 0
160
- n
161
- p
162
- 6
163
- x
164
- 20
165
- test_can_get_objects
166
- M
167
- 1
168
- n
169
- n
170
- x
171
- 20
172
- test_can_get_objects
173
- i
174
- 89
175
- 45
176
- 0
177
- 1
178
- 13
179
- 71
180
- 2
181
- 47
182
- 9
183
- 21
184
- 47
185
- 49
186
- 3
187
- 0
188
- 13
189
- 47
190
- 49
191
- 4
192
- 0
193
- 15
194
- 8
195
- 24
196
- 49
197
- 2
198
- 0
199
- 19
200
- 0
201
- 15
202
- 45
203
- 5
204
- 6
205
- 43
206
- 7
207
- 13
208
- 71
209
- 2
210
- 47
211
- 9
212
- 52
213
- 47
214
- 49
215
- 3
216
- 0
217
- 13
218
- 20
219
- 0
220
- 47
221
- 49
222
- 4
223
- 1
224
- 15
225
- 8
226
- 57
227
- 20
228
- 0
229
- 49
230
- 2
231
- 1
232
- 19
233
- 1
234
- 15
235
- 5
236
- 20
237
- 0
238
- 20
239
- 1
240
- 49
241
- 8
242
- 0
243
- 47
244
- 49
245
- 9
246
- 2
247
- 15
248
- 5
249
- 20
250
- 0
251
- 49
252
- 10
253
- 0
254
- 20
255
- 1
256
- 49
257
- 11
258
- 0
259
- 47
260
- 49
261
- 9
262
- 2
263
- 11
264
- I
265
- 5
266
- I
267
- 2
268
- I
269
- 0
270
- I
271
- 0
272
- n
273
- p
274
- 12
275
- x
276
- 6
277
- Object
278
- n
279
- x
280
- 3
281
- new
282
- x
283
- 8
284
- allocate
285
- x
286
- 10
287
- initialize
288
- x
289
- 3
290
- Ref
291
- n
292
- x
293
- 15
294
- StrongReference
295
- x
296
- 6
297
- object
298
- x
299
- 12
300
- assert_equal
301
- x
302
- 9
303
- object_id
304
- x
305
- 20
306
- referenced_object_id
307
- p
308
- 11
309
- I
310
- -1
311
- I
312
- 4
313
- I
314
- 0
315
- I
316
- 5
317
- I
318
- 1b
319
- I
320
- 6
321
- I
322
- 3c
323
- I
324
- 7
325
- I
326
- 49
327
- I
328
- 8
329
- I
330
- 59
331
- x
332
- 61
333
- /Users/bdurand/dev/projects/ref/test/strong_reference_test.rb
334
- p
335
- 2
336
- x
337
- 3
338
- obj
339
- x
340
- 3
341
- ref
342
- x
343
- 17
344
- method_visibility
345
- x
346
- 15
347
- add_defn_method
348
- x
349
- 12
350
- test_inspect
351
- M
352
- 1
353
- n
354
- n
355
- x
356
- 12
357
- test_inspect
358
- i
359
- 88
360
- 45
361
- 0
362
- 1
363
- 43
364
- 2
365
- 13
366
- 71
367
- 3
368
- 47
369
- 9
370
- 47
371
- 47
372
- 49
373
- 4
374
- 0
375
- 13
376
- 45
377
- 5
378
- 6
379
- 13
380
- 71
381
- 3
382
- 47
383
- 9
384
- 37
385
- 47
386
- 49
387
- 4
388
- 0
389
- 13
390
- 47
391
- 49
392
- 7
393
- 0
394
- 15
395
- 8
396
- 40
397
- 49
398
- 3
399
- 0
400
- 47
401
- 49
402
- 7
403
- 1
404
- 15
405
- 8
406
- 74
407
- 45
408
- 5
409
- 8
410
- 13
411
- 71
412
- 3
413
- 47
414
- 9
415
- 68
416
- 47
417
- 49
418
- 4
419
- 0
420
- 13
421
- 47
422
- 49
423
- 7
424
- 0
425
- 15
426
- 8
427
- 71
428
- 49
429
- 3
430
- 0
431
- 49
432
- 3
433
- 1
434
- 19
435
- 0
436
- 15
437
- 5
438
- 20
439
- 0
440
- 49
441
- 9
442
- 0
443
- 47
444
- 49
445
- 10
446
- 1
447
- 11
448
- I
449
- 5
450
- I
451
- 1
452
- I
453
- 0
454
- I
455
- 0
456
- n
457
- p
458
- 11
459
- x
460
- 3
461
- Ref
462
- n
463
- x
464
- 13
465
- WeakReference
466
- x
467
- 3
468
- new
469
- x
470
- 8
471
- allocate
472
- x
473
- 6
474
- Object
475
- n
476
- x
477
- 10
478
- initialize
479
- n
480
- x
481
- 7
482
- inspect
483
- x
484
- 6
485
- assert
486
- p
487
- 7
488
- I
489
- -1
490
- I
491
- b
492
- I
493
- 0
494
- I
495
- c
496
- I
497
- 4d
498
- I
499
- d
500
- I
501
- 58
502
- x
503
- 61
504
- /Users/bdurand/dev/projects/ref/test/strong_reference_test.rb
505
- p
506
- 1
507
- x
508
- 3
509
- ref
510
- p
511
- 5
512
- I
513
- 2
514
- I
515
- 4
516
- I
517
- 10
518
- I
519
- b
520
- I
521
- 1e
522
- x
523
- 61
524
- /Users/bdurand/dev/projects/ref/test/strong_reference_test.rb
525
- p
526
- 0
527
- x
528
- 13
529
- attach_method
530
- p
531
- 5
532
- I
533
- 0
534
- I
535
- 1
536
- I
537
- 13
538
- I
539
- 3
540
- I
541
- 36
542
- x
543
- 61
544
- /Users/bdurand/dev/projects/ref/test/strong_reference_test.rb
545
- p
546
- 0