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,742 @@
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
+ 12
99
+ hamster/hash
100
+ x
101
+ 7
102
+ Hamster
103
+ n
104
+ x
105
+ 4
106
+ Hash
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
+ 5
140
+ .hash
141
+ M
142
+ 1
143
+ n
144
+ n
145
+ x
146
+ 9
147
+ __block__
148
+ i
149
+ 22
150
+ 5
151
+ 7
152
+ 0
153
+ 60
154
+ 53
155
+ 1
156
+ 44
157
+ 47
158
+ 2
159
+ 1
160
+ 14
161
+ 5
162
+ 7
163
+ 3
164
+ 60
165
+ 53
166
+ 4
167
+ 44
168
+ 47
169
+ 2
170
+ 1
171
+ 11
172
+ I
173
+ 4
174
+ I
175
+ 0
176
+ I
177
+ -1
178
+ I
179
+ -1
180
+ n
181
+ p
182
+ 5
183
+ s
184
+ 12
185
+ with nothing
186
+ M
187
+ 1
188
+ n
189
+ n
190
+ x
191
+ 9
192
+ __block__
193
+ i
194
+ 19
195
+ 5
196
+ 53
197
+ 0
198
+ 44
199
+ 47
200
+ 1
201
+ 0
202
+ 14
203
+ 5
204
+ 7
205
+ 2
206
+ 60
207
+ 53
208
+ 3
209
+ 44
210
+ 47
211
+ 4
212
+ 1
213
+ 11
214
+ I
215
+ 4
216
+ I
217
+ 0
218
+ I
219
+ -1
220
+ I
221
+ -1
222
+ n
223
+ p
224
+ 5
225
+ M
226
+ 1
227
+ n
228
+ n
229
+ x
230
+ 9
231
+ __block__
232
+ i
233
+ 8
234
+ 42
235
+ 0
236
+ 1
237
+ 45
238
+ 2
239
+ 35
240
+ 3
241
+ 11
242
+ I
243
+ 2
244
+ I
245
+ 0
246
+ I
247
+ -1
248
+ I
249
+ -1
250
+ n
251
+ p
252
+ 4
253
+ x
254
+ 7
255
+ Hamster
256
+ n
257
+ x
258
+ 4
259
+ hash
260
+ x
261
+ 5
262
+ @hash
263
+ p
264
+ 5
265
+ I
266
+ 0
267
+ I
268
+ b
269
+ I
270
+ 0
271
+ I
272
+ c
273
+ I
274
+ 8
275
+ x
276
+ 40
277
+ ./spec/hamster/hash/construction_spec.rb
278
+ p
279
+ 0
280
+ x
281
+ 6
282
+ before
283
+ s
284
+ 21
285
+ returns an empty hash
286
+ M
287
+ 1
288
+ n
289
+ n
290
+ x
291
+ 9
292
+ __block__
293
+ i
294
+ 10
295
+ 36
296
+ 0
297
+ 5
298
+ 44
299
+ 45
300
+ 1
301
+ 46
302
+ 2
303
+ 1
304
+ 11
305
+ I
306
+ 3
307
+ I
308
+ 0
309
+ I
310
+ -1
311
+ I
312
+ -1
313
+ n
314
+ p
315
+ 3
316
+ x
317
+ 5
318
+ @hash
319
+ x
320
+ 8
321
+ be_empty
322
+ x
323
+ 6
324
+ should
325
+ p
326
+ 5
327
+ I
328
+ 0
329
+ I
330
+ f
331
+ I
332
+ 0
333
+ I
334
+ 10
335
+ I
336
+ a
337
+ x
338
+ 40
339
+ ./spec/hamster/hash/construction_spec.rb
340
+ p
341
+ 0
342
+ x
343
+ 2
344
+ it
345
+ p
346
+ 7
347
+ I
348
+ 0
349
+ I
350
+ 9
351
+ I
352
+ 0
353
+ I
354
+ b
355
+ I
356
+ 8
357
+ I
358
+ f
359
+ I
360
+ 13
361
+ x
362
+ 40
363
+ ./spec/hamster/hash/construction_spec.rb
364
+ p
365
+ 0
366
+ x
367
+ 8
368
+ describe
369
+ s
370
+ 21
371
+ with an implicit hash
372
+ M
373
+ 1
374
+ n
375
+ n
376
+ x
377
+ 9
378
+ __block__
379
+ i
380
+ 19
381
+ 5
382
+ 53
383
+ 0
384
+ 44
385
+ 47
386
+ 1
387
+ 0
388
+ 14
389
+ 5
390
+ 7
391
+ 2
392
+ 60
393
+ 53
394
+ 3
395
+ 44
396
+ 47
397
+ 4
398
+ 1
399
+ 11
400
+ I
401
+ 4
402
+ I
403
+ 0
404
+ I
405
+ -1
406
+ I
407
+ -1
408
+ n
409
+ p
410
+ 5
411
+ M
412
+ 1
413
+ n
414
+ n
415
+ x
416
+ 9
417
+ __block__
418
+ i
419
+ 50
420
+ 42
421
+ 0
422
+ 1
423
+ 41
424
+ 40
425
+ 2
426
+ 4
427
+ 3
428
+ 46
429
+ 3
430
+ 1
431
+ 13
432
+ 7
433
+ 4
434
+ 60
435
+ 7
436
+ 5
437
+ 60
438
+ 46
439
+ 6
440
+ 2
441
+ 14
442
+ 13
443
+ 7
444
+ 7
445
+ 60
446
+ 7
447
+ 8
448
+ 60
449
+ 46
450
+ 6
451
+ 2
452
+ 14
453
+ 13
454
+ 7
455
+ 9
456
+ 60
457
+ 7
458
+ 10
459
+ 60
460
+ 46
461
+ 6
462
+ 2
463
+ 14
464
+ 46
465
+ 11
466
+ 1
467
+ 35
468
+ 12
469
+ 11
470
+ I
471
+ 6
472
+ I
473
+ 0
474
+ I
475
+ -1
476
+ I
477
+ -1
478
+ n
479
+ p
480
+ 13
481
+ x
482
+ 7
483
+ Hamster
484
+ n
485
+ x
486
+ 4
487
+ Hash
488
+ x
489
+ 16
490
+ new_from_literal
491
+ s
492
+ 1
493
+ A
494
+ s
495
+ 3
496
+ aye
497
+ x
498
+ 3
499
+ []=
500
+ s
501
+ 1
502
+ B
503
+ s
504
+ 3
505
+ bee
506
+ s
507
+ 1
508
+ C
509
+ s
510
+ 3
511
+ see
512
+ x
513
+ 4
514
+ hash
515
+ x
516
+ 5
517
+ @hash
518
+ p
519
+ 5
520
+ I
521
+ 0
522
+ I
523
+ 17
524
+ I
525
+ 0
526
+ I
527
+ 18
528
+ I
529
+ 32
530
+ x
531
+ 40
532
+ ./spec/hamster/hash/construction_spec.rb
533
+ p
534
+ 0
535
+ x
536
+ 6
537
+ before
538
+ s
539
+ 38
540
+ is equivalent to repeatedly using #put
541
+ M
542
+ 1
543
+ n
544
+ n
545
+ x
546
+ 9
547
+ __block__
548
+ i
549
+ 39
550
+ 36
551
+ 0
552
+ 45
553
+ 1
554
+ 42
555
+ 2
556
+ 3
557
+ 45
558
+ 4
559
+ 7
560
+ 5
561
+ 60
562
+ 7
563
+ 6
564
+ 60
565
+ 46
566
+ 7
567
+ 2
568
+ 7
569
+ 8
570
+ 60
571
+ 7
572
+ 9
573
+ 60
574
+ 46
575
+ 7
576
+ 2
577
+ 7
578
+ 10
579
+ 60
580
+ 7
581
+ 11
582
+ 60
583
+ 46
584
+ 7
585
+ 2
586
+ 79
587
+ 12
588
+ 11
589
+ I
590
+ 5
591
+ I
592
+ 0
593
+ I
594
+ -1
595
+ I
596
+ -1
597
+ n
598
+ p
599
+ 13
600
+ x
601
+ 5
602
+ @hash
603
+ x
604
+ 6
605
+ should
606
+ x
607
+ 7
608
+ Hamster
609
+ n
610
+ x
611
+ 4
612
+ hash
613
+ s
614
+ 1
615
+ A
616
+ s
617
+ 3
618
+ aye
619
+ x
620
+ 3
621
+ put
622
+ s
623
+ 1
624
+ B
625
+ s
626
+ 3
627
+ bee
628
+ s
629
+ 1
630
+ C
631
+ s
632
+ 3
633
+ see
634
+ x
635
+ 2
636
+ ==
637
+ p
638
+ 5
639
+ I
640
+ 0
641
+ I
642
+ 1b
643
+ I
644
+ 0
645
+ I
646
+ 1c
647
+ I
648
+ 27
649
+ x
650
+ 40
651
+ ./spec/hamster/hash/construction_spec.rb
652
+ p
653
+ 0
654
+ x
655
+ 2
656
+ it
657
+ p
658
+ 7
659
+ I
660
+ 0
661
+ I
662
+ 15
663
+ I
664
+ 0
665
+ I
666
+ 17
667
+ I
668
+ 8
669
+ I
670
+ 1b
671
+ I
672
+ 13
673
+ x
674
+ 40
675
+ ./spec/hamster/hash/construction_spec.rb
676
+ p
677
+ 0
678
+ p
679
+ 7
680
+ I
681
+ 0
682
+ I
683
+ 7
684
+ I
685
+ 0
686
+ I
687
+ 9
688
+ I
689
+ b
690
+ I
691
+ 15
692
+ I
693
+ 16
694
+ x
695
+ 40
696
+ ./spec/hamster/hash/construction_spec.rb
697
+ p
698
+ 0
699
+ x
700
+ 8
701
+ describe
702
+ p
703
+ 5
704
+ I
705
+ 0
706
+ I
707
+ 5
708
+ I
709
+ 0
710
+ I
711
+ 7
712
+ I
713
+ b
714
+ x
715
+ 40
716
+ ./spec/hamster/hash/construction_spec.rb
717
+ p
718
+ 0
719
+ x
720
+ 8
721
+ describe
722
+ p
723
+ 7
724
+ I
725
+ 0
726
+ I
727
+ 1
728
+ I
729
+ 1a
730
+ I
731
+ 3
732
+ I
733
+ 23
734
+ I
735
+ 5
736
+ I
737
+ 32
738
+ x
739
+ 40
740
+ ./spec/hamster/hash/construction_spec.rb
741
+ p
742
+ 0