hamster 0.1.15 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. data/History.rdoc +16 -0
  2. data/README.rdoc +10 -10
  3. data/lib/hamster/core_ext/enumerable.rb +1 -1
  4. data/lib/hamster/core_ext/enumerable.rbc +481 -0
  5. data/lib/hamster/core_ext/io.rb +0 -1
  6. data/lib/hamster/core_ext/io.rbc +604 -0
  7. data/lib/hamster/hash.rb +6 -6
  8. data/lib/hamster/hash.rbc +3117 -0
  9. data/lib/hamster/list.rb +50 -14
  10. data/lib/hamster/list.rbc +7274 -0
  11. data/lib/hamster/set.rb +8 -7
  12. data/lib/hamster/set.rbc +3152 -0
  13. data/lib/hamster/stack.rbc +1358 -0
  14. data/lib/hamster/trie.rbc +3416 -0
  15. data/lib/hamster/version.rb +1 -1
  16. data/spec/hamster/core_ext/enumerable_spec.rb +1 -1
  17. data/spec/hamster/core_ext/enumerable_spec.rbc +747 -0
  18. data/spec/hamster/core_ext/io_spec.rbc +409 -0
  19. data/spec/hamster/hash/all_spec.rbc +1214 -0
  20. data/spec/hamster/hash/any_spec.rbc +1495 -0
  21. data/spec/hamster/hash/construction_spec.rbc +742 -0
  22. data/spec/hamster/hash/copying_spec.rbc +519 -0
  23. data/spec/hamster/hash/each_spec.rbc +908 -0
  24. data/spec/hamster/hash/empty_spec.rbc +517 -0
  25. data/spec/hamster/hash/eql_spec.rb +1 -1
  26. data/spec/hamster/hash/eql_spec.rbc +1702 -0
  27. data/spec/hamster/hash/filter_spec.rbc +1433 -0
  28. data/spec/hamster/hash/get_spec.rbc +791 -0
  29. data/spec/hamster/hash/has_key_spec.rbc +719 -0
  30. data/spec/hamster/hash/map_spec.rbc +1454 -0
  31. data/spec/hamster/hash/none_spec.rbc +1399 -0
  32. data/spec/hamster/hash/put_spec.rbc +1334 -0
  33. data/spec/hamster/hash/reduce_spec.rbc +1234 -0
  34. data/spec/hamster/hash/reject_spec.rbc +1445 -0
  35. data/spec/hamster/hash/remove_spec.rbc +1135 -0
  36. data/spec/hamster/hash/size_spec.rbc +596 -0
  37. data/spec/hamster/list/all_spec.rb +12 -4
  38. data/spec/hamster/list/all_spec.rbc +1760 -0
  39. data/spec/hamster/list/any_spec.rb +12 -4
  40. data/spec/hamster/list/any_spec.rbc +1888 -0
  41. data/spec/hamster/list/append_spec.rb +12 -5
  42. data/spec/hamster/list/append_spec.rbc +1555 -0
  43. data/spec/hamster/list/cadr_spec.rb +1 -1
  44. data/spec/hamster/list/cadr_spec.rbc +855 -0
  45. data/spec/hamster/list/cons_spec.rbc +848 -0
  46. data/spec/hamster/list/construction_spec.rbc +1732 -0
  47. data/spec/hamster/list/copying_spec.rbc +555 -0
  48. data/spec/hamster/list/drop_spec.rb +12 -4
  49. data/spec/hamster/list/drop_spec.rbc +1081 -0
  50. data/spec/hamster/list/drop_while_spec.rb +12 -4
  51. data/spec/hamster/list/drop_while_spec.rbc +1286 -0
  52. data/spec/hamster/list/each_spec.rb +13 -5
  53. data/spec/hamster/list/each_spec.rbc +1365 -0
  54. data/spec/hamster/list/empty_spec.rb +1 -1
  55. data/spec/hamster/list/empty_spec.rbc +571 -0
  56. data/spec/hamster/list/eql_spec.rb +15 -5
  57. data/spec/hamster/list/eql_spec.rbc +1819 -0
  58. data/spec/hamster/list/filter_spec.rb +13 -5
  59. data/spec/hamster/list/filter_spec.rbc +1595 -0
  60. data/spec/hamster/list/find_spec.rb +12 -4
  61. data/spec/hamster/list/find_spec.rbc +1456 -0
  62. data/spec/hamster/list/head_spec.rb +1 -1
  63. data/spec/hamster/list/head_spec.rbc +575 -0
  64. data/spec/hamster/list/include_spec.rb +12 -4
  65. data/spec/hamster/list/include_spec.rbc +1173 -0
  66. data/spec/hamster/list/inspect_spec.rb +13 -5
  67. data/spec/hamster/list/inspect_spec.rbc +995 -0
  68. data/spec/hamster/list/map_spec.rb +12 -4
  69. data/spec/hamster/list/map_spec.rbc +1545 -0
  70. data/spec/hamster/list/maximum_spec.rb +83 -0
  71. data/spec/hamster/list/minimum_spec.rb +83 -0
  72. data/spec/hamster/list/none_spec.rb +11 -3
  73. data/spec/hamster/list/none_spec.rbc +1788 -0
  74. data/spec/hamster/list/one_spec.rb +83 -0
  75. data/spec/hamster/list/partition_spec.rb +37 -9
  76. data/spec/hamster/list/partition_spec.rbc +2715 -0
  77. data/spec/hamster/list/reduce_spec.rb +12 -4
  78. data/spec/hamster/list/reduce_spec.rbc +2081 -0
  79. data/spec/hamster/list/reject_spec.rb +12 -4
  80. data/spec/hamster/list/reject_spec.rbc +1590 -0
  81. data/spec/hamster/list/reverse_spec.rb +12 -4
  82. data/spec/hamster/list/reverse_spec.rbc +1061 -0
  83. data/spec/hamster/list/size_spec.rb +13 -5
  84. data/spec/hamster/list/size_spec.rbc +1063 -0
  85. data/spec/hamster/list/tail_spec.rb +1 -1
  86. data/spec/hamster/list/tail_spec.rbc +595 -0
  87. data/spec/hamster/list/take_spec.rb +12 -4
  88. data/spec/hamster/list/take_spec.rbc +1075 -0
  89. data/spec/hamster/list/take_while_spec.rb +12 -4
  90. data/spec/hamster/list/take_while_spec.rbc +1446 -0
  91. data/spec/hamster/list/to_a_spec.rb +31 -19
  92. data/spec/hamster/list/to_a_spec.rbc +961 -0
  93. data/spec/hamster/list/to_ary_spec.rb +11 -3
  94. data/spec/hamster/list/to_ary_spec.rbc +1080 -0
  95. data/spec/hamster/list/to_list_spec.rb +31 -0
  96. data/spec/hamster/set/add_spec.rbc +1039 -0
  97. data/spec/hamster/set/all_spec.rbc +1316 -0
  98. data/spec/hamster/set/any_spec.rbc +1444 -0
  99. data/spec/hamster/set/construction_spec.rbc +422 -0
  100. data/spec/hamster/set/copying_spec.rbc +469 -0
  101. data/spec/hamster/set/each_spec.rbc +820 -0
  102. data/spec/hamster/set/empty_spec.rbc +452 -0
  103. data/spec/hamster/set/eql_spec.rb +1 -1
  104. data/spec/hamster/set/eql_spec.rbc +1309 -0
  105. data/spec/hamster/set/filter_spec.rbc +1272 -0
  106. data/spec/hamster/set/include_spec.rbc +657 -0
  107. data/spec/hamster/set/map_spec.rbc +1285 -0
  108. data/spec/hamster/set/none_spec.rbc +1344 -0
  109. data/spec/hamster/set/reduce_spec.rbc +1177 -0
  110. data/spec/hamster/set/reject_spec.rbc +1273 -0
  111. data/spec/hamster/set/remove_spec.rbc +947 -0
  112. data/spec/hamster/set/size_spec.rbc +531 -0
  113. data/spec/hamster/set/to_a_spec.rb +16 -12
  114. data/spec/hamster/set/to_a_spec.rbc +559 -0
  115. data/spec/hamster/stack/construction_spec.rbc +862 -0
  116. data/spec/hamster/stack/copying_spec.rbc +555 -0
  117. data/spec/hamster/stack/empty_spec.rb +1 -1
  118. data/spec/hamster/stack/empty_spec.rbc +571 -0
  119. data/spec/hamster/stack/eql_spec.rb +1 -1
  120. data/spec/hamster/stack/eql_spec.rbc +1281 -0
  121. data/spec/hamster/stack/inspect_spec.rb +1 -1
  122. data/spec/hamster/stack/inspect_spec.rbc +586 -0
  123. data/spec/hamster/stack/pop_spec.rbc +1099 -0
  124. data/spec/hamster/stack/push_spec.rbc +848 -0
  125. data/spec/hamster/stack/size_spec.rb +1 -1
  126. data/spec/hamster/stack/size_spec.rbc +650 -0
  127. data/spec/hamster/stack/top_spec.rbc +676 -0
  128. data/spec/hamster/trie/remove_spec.rbc +40 -0
  129. data/spec/spec_helper.rbc +163 -0
  130. data/tasks/spec.rbc +201 -0
  131. metadata +90 -2
@@ -0,0 +1,422 @@
1
+ !RBIX
2
+ 0
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 50
13
+ 5
14
+ 42
15
+ 0
16
+ 1
17
+ 42
18
+ 0
19
+ 2
20
+ 61
21
+ 45
22
+ 3
23
+ 46
24
+ 4
25
+ 1
26
+ 7
27
+ 5
28
+ 60
29
+ 77
30
+ 6
31
+ 46
32
+ 7
33
+ 1
34
+ 44
35
+ 46
36
+ 8
37
+ 1
38
+ 14
39
+ 5
40
+ 7
41
+ 9
42
+ 60
43
+ 44
44
+ 46
45
+ 8
46
+ 1
47
+ 14
48
+ 5
49
+ 42
50
+ 10
51
+ 11
52
+ 40
53
+ 12
54
+ 53
55
+ 13
56
+ 44
57
+ 47
58
+ 14
59
+ 1
60
+ 14
61
+ 2
62
+ 11
63
+ I
64
+ 4
65
+ I
66
+ 0
67
+ I
68
+ 0
69
+ I
70
+ 0
71
+ n
72
+ p
73
+ 15
74
+ x
75
+ 4
76
+ File
77
+ n
78
+ n
79
+ x
80
+ 11
81
+ active_path
82
+ x
83
+ 7
84
+ dirname
85
+ s
86
+ 18
87
+ /../../spec_helper
88
+ x
89
+ 1
90
+ +
91
+ x
92
+ 11
93
+ expand_path
94
+ x
95
+ 7
96
+ require
97
+ s
98
+ 11
99
+ hamster/set
100
+ x
101
+ 7
102
+ Hamster
103
+ n
104
+ x
105
+ 3
106
+ Set
107
+ M
108
+ 1
109
+ n
110
+ n
111
+ x
112
+ 9
113
+ __block__
114
+ i
115
+ 11
116
+ 5
117
+ 7
118
+ 0
119
+ 60
120
+ 53
121
+ 1
122
+ 44
123
+ 47
124
+ 2
125
+ 1
126
+ 11
127
+ I
128
+ 4
129
+ I
130
+ 0
131
+ I
132
+ -1
133
+ I
134
+ -1
135
+ n
136
+ p
137
+ 3
138
+ s
139
+ 4
140
+ .set
141
+ M
142
+ 1
143
+ n
144
+ n
145
+ x
146
+ 9
147
+ __block__
148
+ i
149
+ 19
150
+ 5
151
+ 53
152
+ 0
153
+ 44
154
+ 47
155
+ 1
156
+ 0
157
+ 14
158
+ 5
159
+ 7
160
+ 2
161
+ 60
162
+ 53
163
+ 3
164
+ 44
165
+ 47
166
+ 4
167
+ 1
168
+ 11
169
+ I
170
+ 4
171
+ I
172
+ 0
173
+ I
174
+ -1
175
+ I
176
+ -1
177
+ n
178
+ p
179
+ 5
180
+ M
181
+ 1
182
+ n
183
+ n
184
+ x
185
+ 9
186
+ __block__
187
+ i
188
+ 18
189
+ 42
190
+ 0
191
+ 1
192
+ 7
193
+ 2
194
+ 60
195
+ 7
196
+ 3
197
+ 60
198
+ 7
199
+ 4
200
+ 60
201
+ 46
202
+ 5
203
+ 3
204
+ 35
205
+ 6
206
+ 11
207
+ I
208
+ 5
209
+ I
210
+ 0
211
+ I
212
+ -1
213
+ I
214
+ -1
215
+ n
216
+ p
217
+ 7
218
+ x
219
+ 7
220
+ Hamster
221
+ n
222
+ s
223
+ 1
224
+ A
225
+ s
226
+ 1
227
+ B
228
+ s
229
+ 1
230
+ C
231
+ x
232
+ 3
233
+ set
234
+ x
235
+ 4
236
+ @set
237
+ p
238
+ 5
239
+ I
240
+ 0
241
+ I
242
+ 9
243
+ I
244
+ 0
245
+ I
246
+ a
247
+ I
248
+ 12
249
+ x
250
+ 39
251
+ ./spec/hamster/set/construction_spec.rb
252
+ p
253
+ 0
254
+ x
255
+ 6
256
+ before
257
+ s
258
+ 38
259
+ is equivalent to repeatedly using #add
260
+ M
261
+ 1
262
+ n
263
+ n
264
+ x
265
+ 9
266
+ __block__
267
+ i
268
+ 30
269
+ 36
270
+ 0
271
+ 45
272
+ 1
273
+ 42
274
+ 2
275
+ 3
276
+ 45
277
+ 4
278
+ 7
279
+ 5
280
+ 60
281
+ 46
282
+ 6
283
+ 1
284
+ 7
285
+ 7
286
+ 60
287
+ 46
288
+ 6
289
+ 1
290
+ 7
291
+ 8
292
+ 60
293
+ 46
294
+ 6
295
+ 1
296
+ 79
297
+ 9
298
+ 11
299
+ I
300
+ 4
301
+ I
302
+ 0
303
+ I
304
+ -1
305
+ I
306
+ -1
307
+ n
308
+ p
309
+ 10
310
+ x
311
+ 4
312
+ @set
313
+ x
314
+ 6
315
+ should
316
+ x
317
+ 7
318
+ Hamster
319
+ n
320
+ x
321
+ 3
322
+ set
323
+ s
324
+ 1
325
+ A
326
+ x
327
+ 3
328
+ add
329
+ s
330
+ 1
331
+ B
332
+ s
333
+ 1
334
+ C
335
+ x
336
+ 2
337
+ ==
338
+ p
339
+ 5
340
+ I
341
+ 0
342
+ I
343
+ d
344
+ I
345
+ 0
346
+ I
347
+ e
348
+ I
349
+ 1e
350
+ x
351
+ 39
352
+ ./spec/hamster/set/construction_spec.rb
353
+ p
354
+ 0
355
+ x
356
+ 2
357
+ it
358
+ p
359
+ 7
360
+ I
361
+ 0
362
+ I
363
+ 7
364
+ I
365
+ 0
366
+ I
367
+ 9
368
+ I
369
+ 8
370
+ I
371
+ d
372
+ I
373
+ 13
374
+ x
375
+ 39
376
+ ./spec/hamster/set/construction_spec.rb
377
+ p
378
+ 0
379
+ x
380
+ 8
381
+ describe
382
+ p
383
+ 5
384
+ I
385
+ 0
386
+ I
387
+ 5
388
+ I
389
+ 0
390
+ I
391
+ 7
392
+ I
393
+ b
394
+ x
395
+ 39
396
+ ./spec/hamster/set/construction_spec.rb
397
+ p
398
+ 0
399
+ x
400
+ 8
401
+ describe
402
+ p
403
+ 7
404
+ I
405
+ 0
406
+ I
407
+ 1
408
+ I
409
+ 1a
410
+ I
411
+ 3
412
+ I
413
+ 23
414
+ I
415
+ 5
416
+ I
417
+ 32
418
+ x
419
+ 39
420
+ ./spec/hamster/set/construction_spec.rb
421
+ p
422
+ 0
@@ -0,0 +1,469 @@
1
+ !RBIX
2
+ 0
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 50
13
+ 5
14
+ 42
15
+ 0
16
+ 1
17
+ 42
18
+ 0
19
+ 2
20
+ 61
21
+ 45
22
+ 3
23
+ 46
24
+ 4
25
+ 1
26
+ 7
27
+ 5
28
+ 60
29
+ 77
30
+ 6
31
+ 46
32
+ 7
33
+ 1
34
+ 44
35
+ 46
36
+ 8
37
+ 1
38
+ 14
39
+ 5
40
+ 7
41
+ 9
42
+ 60
43
+ 44
44
+ 46
45
+ 8
46
+ 1
47
+ 14
48
+ 5
49
+ 42
50
+ 10
51
+ 11
52
+ 40
53
+ 12
54
+ 53
55
+ 13
56
+ 44
57
+ 47
58
+ 14
59
+ 1
60
+ 14
61
+ 2
62
+ 11
63
+ I
64
+ 4
65
+ I
66
+ 0
67
+ I
68
+ 0
69
+ I
70
+ 0
71
+ n
72
+ p
73
+ 15
74
+ x
75
+ 4
76
+ File
77
+ n
78
+ n
79
+ x
80
+ 11
81
+ active_path
82
+ x
83
+ 7
84
+ dirname
85
+ s
86
+ 18
87
+ /../../spec_helper
88
+ x
89
+ 1
90
+ +
91
+ x
92
+ 11
93
+ expand_path
94
+ x
95
+ 7
96
+ require
97
+ s
98
+ 11
99
+ hamster/set
100
+ x
101
+ 7
102
+ Hamster
103
+ n
104
+ x
105
+ 3
106
+ Set
107
+ M
108
+ 1
109
+ n
110
+ n
111
+ x
112
+ 9
113
+ __block__
114
+ i
115
+ 20
116
+ 5
117
+ 53
118
+ 0
119
+ 44
120
+ 47
121
+ 1
122
+ 0
123
+ 14
124
+ 7
125
+ 2
126
+ 7
127
+ 3
128
+ 32
129
+ 2
130
+ 53
131
+ 4
132
+ 47
133
+ 5
134
+ 0
135
+ 11
136
+ I
137
+ 3
138
+ I
139
+ 0
140
+ I
141
+ -1
142
+ I
143
+ -1
144
+ n
145
+ p
146
+ 6
147
+ M
148
+ 1
149
+ n
150
+ n
151
+ x
152
+ 9
153
+ __block__
154
+ i
155
+ 18
156
+ 42
157
+ 0
158
+ 1
159
+ 7
160
+ 2
161
+ 60
162
+ 7
163
+ 3
164
+ 60
165
+ 7
166
+ 4
167
+ 60
168
+ 46
169
+ 5
170
+ 3
171
+ 35
172
+ 6
173
+ 11
174
+ I
175
+ 5
176
+ I
177
+ 0
178
+ I
179
+ -1
180
+ I
181
+ -1
182
+ n
183
+ p
184
+ 7
185
+ x
186
+ 7
187
+ Hamster
188
+ n
189
+ s
190
+ 1
191
+ A
192
+ s
193
+ 1
194
+ B
195
+ s
196
+ 1
197
+ C
198
+ x
199
+ 3
200
+ set
201
+ x
202
+ 4
203
+ @set
204
+ p
205
+ 5
206
+ I
207
+ 0
208
+ I
209
+ 7
210
+ I
211
+ 0
212
+ I
213
+ 8
214
+ I
215
+ 12
216
+ x
217
+ 34
218
+ ./spec/hamster/set/copying_spec.rb
219
+ p
220
+ 0
221
+ x
222
+ 6
223
+ before
224
+ x
225
+ 3
226
+ dup
227
+ x
228
+ 5
229
+ clone
230
+ M
231
+ 1
232
+ n
233
+ n
234
+ x
235
+ 9
236
+ __block__
237
+ i
238
+ 21
239
+ 54
240
+ 17
241
+ 0
242
+ 14
243
+ 5
244
+ 18
245
+ 0
246
+ 44
247
+ 45
248
+ 0
249
+ 7
250
+ 1
251
+ 60
252
+ 59
253
+ 53
254
+ 2
255
+ 44
256
+ 47
257
+ 3
258
+ 1
259
+ 11
260
+ I
261
+ 5
262
+ I
263
+ 1
264
+ I
265
+ 1
266
+ I
267
+ 1
268
+ n
269
+ p
270
+ 4
271
+ x
272
+ 4
273
+ to_s
274
+ s
275
+ 1
276
+ #
277
+ M
278
+ 1
279
+ n
280
+ n
281
+ x
282
+ 9
283
+ __block__
284
+ i
285
+ 11
286
+ 5
287
+ 7
288
+ 0
289
+ 60
290
+ 53
291
+ 1
292
+ 44
293
+ 47
294
+ 2
295
+ 1
296
+ 11
297
+ I
298
+ 4
299
+ I
300
+ 0
301
+ I
302
+ -1
303
+ I
304
+ -1
305
+ n
306
+ p
307
+ 3
308
+ s
309
+ 12
310
+ returns self
311
+ M
312
+ 1
313
+ n
314
+ n
315
+ x
316
+ 9
317
+ __block__
318
+ i
319
+ 19
320
+ 36
321
+ 0
322
+ 19
323
+ 2
324
+ 0
325
+ 46
326
+ 1
327
+ 1
328
+ 5
329
+ 36
330
+ 0
331
+ 44
332
+ 46
333
+ 2
334
+ 1
335
+ 46
336
+ 3
337
+ 1
338
+ 11
339
+ I
340
+ 4
341
+ I
342
+ 0
343
+ I
344
+ -1
345
+ I
346
+ -1
347
+ n
348
+ p
349
+ 4
350
+ x
351
+ 4
352
+ @set
353
+ x
354
+ 4
355
+ send
356
+ x
357
+ 5
358
+ equal
359
+ x
360
+ 6
361
+ should
362
+ p
363
+ 5
364
+ I
365
+ 0
366
+ I
367
+ f
368
+ I
369
+ 0
370
+ I
371
+ 10
372
+ I
373
+ 13
374
+ x
375
+ 34
376
+ ./spec/hamster/set/copying_spec.rb
377
+ p
378
+ 0
379
+ x
380
+ 2
381
+ it
382
+ p
383
+ 5
384
+ I
385
+ 0
386
+ I
387
+ d
388
+ I
389
+ 0
390
+ I
391
+ f
392
+ I
393
+ b
394
+ x
395
+ 34
396
+ ./spec/hamster/set/copying_spec.rb
397
+ p
398
+ 0
399
+ x
400
+ 8
401
+ describe
402
+ p
403
+ 5
404
+ I
405
+ 0
406
+ I
407
+ b
408
+ I
409
+ 4
410
+ I
411
+ d
412
+ I
413
+ 15
414
+ x
415
+ 34
416
+ ./spec/hamster/set/copying_spec.rb
417
+ p
418
+ 1
419
+ x
420
+ 6
421
+ method
422
+ x
423
+ 4
424
+ each
425
+ p
426
+ 7
427
+ I
428
+ 0
429
+ I
430
+ 5
431
+ I
432
+ 0
433
+ I
434
+ 7
435
+ I
436
+ 8
437
+ I
438
+ b
439
+ I
440
+ 14
441
+ x
442
+ 34
443
+ ./spec/hamster/set/copying_spec.rb
444
+ p
445
+ 0
446
+ x
447
+ 8
448
+ describe
449
+ p
450
+ 7
451
+ I
452
+ 0
453
+ I
454
+ 1
455
+ I
456
+ 1a
457
+ I
458
+ 3
459
+ I
460
+ 23
461
+ I
462
+ 5
463
+ I
464
+ 32
465
+ x
466
+ 34
467
+ ./spec/hamster/set/copying_spec.rb
468
+ p
469
+ 0