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,908 @@
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
+ #each
141
+ M
142
+ 1
143
+ n
144
+ n
145
+ x
146
+ 9
147
+ __block__
148
+ i
149
+ 30
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
+ 14
169
+ 5
170
+ 7
171
+ 5
172
+ 60
173
+ 53
174
+ 6
175
+ 44
176
+ 47
177
+ 4
178
+ 1
179
+ 11
180
+ I
181
+ 4
182
+ I
183
+ 0
184
+ I
185
+ -1
186
+ I
187
+ -1
188
+ n
189
+ p
190
+ 7
191
+ M
192
+ 1
193
+ n
194
+ n
195
+ x
196
+ 9
197
+ __block__
198
+ i
199
+ 50
200
+ 42
201
+ 0
202
+ 1
203
+ 41
204
+ 40
205
+ 2
206
+ 4
207
+ 3
208
+ 46
209
+ 3
210
+ 1
211
+ 13
212
+ 7
213
+ 4
214
+ 60
215
+ 7
216
+ 5
217
+ 60
218
+ 46
219
+ 6
220
+ 2
221
+ 14
222
+ 13
223
+ 7
224
+ 7
225
+ 60
226
+ 7
227
+ 8
228
+ 60
229
+ 46
230
+ 6
231
+ 2
232
+ 14
233
+ 13
234
+ 7
235
+ 9
236
+ 60
237
+ 7
238
+ 10
239
+ 60
240
+ 46
241
+ 6
242
+ 2
243
+ 14
244
+ 46
245
+ 11
246
+ 1
247
+ 35
248
+ 12
249
+ 11
250
+ I
251
+ 6
252
+ I
253
+ 0
254
+ I
255
+ -1
256
+ I
257
+ -1
258
+ n
259
+ p
260
+ 13
261
+ x
262
+ 7
263
+ Hamster
264
+ n
265
+ x
266
+ 4
267
+ Hash
268
+ x
269
+ 16
270
+ new_from_literal
271
+ s
272
+ 1
273
+ A
274
+ s
275
+ 3
276
+ aye
277
+ x
278
+ 3
279
+ []=
280
+ s
281
+ 1
282
+ B
283
+ s
284
+ 3
285
+ bee
286
+ s
287
+ 1
288
+ C
289
+ s
290
+ 3
291
+ see
292
+ x
293
+ 4
294
+ hash
295
+ x
296
+ 5
297
+ @hash
298
+ p
299
+ 5
300
+ I
301
+ 0
302
+ I
303
+ 9
304
+ I
305
+ 0
306
+ I
307
+ a
308
+ I
309
+ 32
310
+ x
311
+ 32
312
+ ./spec/hamster/hash/each_spec.rb
313
+ p
314
+ 0
315
+ x
316
+ 6
317
+ before
318
+ s
319
+ 33
320
+ with a block (internal iteration)
321
+ M
322
+ 1
323
+ n
324
+ n
325
+ x
326
+ 9
327
+ __block__
328
+ i
329
+ 22
330
+ 5
331
+ 7
332
+ 0
333
+ 60
334
+ 53
335
+ 1
336
+ 44
337
+ 47
338
+ 2
339
+ 1
340
+ 14
341
+ 5
342
+ 7
343
+ 3
344
+ 60
345
+ 53
346
+ 4
347
+ 44
348
+ 47
349
+ 2
350
+ 1
351
+ 11
352
+ I
353
+ 4
354
+ I
355
+ 0
356
+ I
357
+ -1
358
+ I
359
+ -1
360
+ n
361
+ p
362
+ 5
363
+ s
364
+ 12
365
+ returns self
366
+ M
367
+ 1
368
+ n
369
+ n
370
+ x
371
+ 9
372
+ __block__
373
+ i
374
+ 18
375
+ 36
376
+ 0
377
+ 53
378
+ 1
379
+ 47
380
+ 2
381
+ 0
382
+ 5
383
+ 36
384
+ 0
385
+ 44
386
+ 46
387
+ 3
388
+ 1
389
+ 46
390
+ 4
391
+ 1
392
+ 11
393
+ I
394
+ 4
395
+ I
396
+ 0
397
+ I
398
+ -1
399
+ I
400
+ -1
401
+ n
402
+ p
403
+ 5
404
+ x
405
+ 5
406
+ @hash
407
+ M
408
+ 1
409
+ n
410
+ n
411
+ x
412
+ 9
413
+ __block__
414
+ i
415
+ 2
416
+ 1
417
+ 11
418
+ I
419
+ 2
420
+ I
421
+ 0
422
+ I
423
+ -1
424
+ I
425
+ -1
426
+ n
427
+ p
428
+ 0
429
+ p
430
+ 3
431
+ I
432
+ 0
433
+ I
434
+ 10
435
+ I
436
+ 2
437
+ x
438
+ 32
439
+ ./spec/hamster/hash/each_spec.rb
440
+ p
441
+ 0
442
+ x
443
+ 4
444
+ each
445
+ x
446
+ 5
447
+ equal
448
+ x
449
+ 6
450
+ should
451
+ p
452
+ 5
453
+ I
454
+ 0
455
+ I
456
+ f
457
+ I
458
+ 0
459
+ I
460
+ 10
461
+ I
462
+ 12
463
+ x
464
+ 32
465
+ ./spec/hamster/hash/each_spec.rb
466
+ p
467
+ 0
468
+ x
469
+ 2
470
+ it
471
+ s
472
+ 26
473
+ yields all key/value pairs
474
+ M
475
+ 1
476
+ n
477
+ n
478
+ x
479
+ 9
480
+ __block__
481
+ i
482
+ 66
483
+ 41
484
+ 40
485
+ 0
486
+ 74
487
+ 46
488
+ 1
489
+ 1
490
+ 17
491
+ 0
492
+ 14
493
+ 36
494
+ 2
495
+ 53
496
+ 3
497
+ 47
498
+ 4
499
+ 0
500
+ 14
501
+ 18
502
+ 0
503
+ 45
504
+ 5
505
+ 41
506
+ 40
507
+ 0
508
+ 4
509
+ 3
510
+ 46
511
+ 1
512
+ 1
513
+ 13
514
+ 7
515
+ 6
516
+ 60
517
+ 7
518
+ 7
519
+ 60
520
+ 46
521
+ 8
522
+ 2
523
+ 14
524
+ 13
525
+ 7
526
+ 9
527
+ 60
528
+ 7
529
+ 10
530
+ 60
531
+ 46
532
+ 8
533
+ 2
534
+ 14
535
+ 13
536
+ 7
537
+ 11
538
+ 60
539
+ 7
540
+ 12
541
+ 60
542
+ 46
543
+ 8
544
+ 2
545
+ 14
546
+ 79
547
+ 13
548
+ 11
549
+ I
550
+ 7
551
+ I
552
+ 1
553
+ I
554
+ -1
555
+ I
556
+ -1
557
+ n
558
+ p
559
+ 14
560
+ x
561
+ 4
562
+ Hash
563
+ x
564
+ 16
565
+ new_from_literal
566
+ x
567
+ 5
568
+ @hash
569
+ M
570
+ 1
571
+ n
572
+ n
573
+ x
574
+ 9
575
+ __block__
576
+ i
577
+ 26
578
+ 55
579
+ 33
580
+ 34
581
+ 17
582
+ 0
583
+ 14
584
+ 34
585
+ 17
586
+ 1
587
+ 14
588
+ 14
589
+ 19
590
+ 1
591
+ 0
592
+ 18
593
+ 0
594
+ 18
595
+ 1
596
+ 13
597
+ 16
598
+ 3
599
+ 46
600
+ 0
601
+ 2
602
+ 14
603
+ 11
604
+ I
605
+ 7
606
+ I
607
+ 2
608
+ I
609
+ 2
610
+ I
611
+ 2
612
+ n
613
+ p
614
+ 1
615
+ x
616
+ 3
617
+ []=
618
+ p
619
+ 3
620
+ I
621
+ 0
622
+ I
623
+ 15
624
+ I
625
+ 1a
626
+ x
627
+ 32
628
+ ./spec/hamster/hash/each_spec.rb
629
+ p
630
+ 2
631
+ x
632
+ 3
633
+ key
634
+ x
635
+ 5
636
+ value
637
+ x
638
+ 4
639
+ each
640
+ x
641
+ 6
642
+ should
643
+ s
644
+ 1
645
+ A
646
+ s
647
+ 3
648
+ aye
649
+ x
650
+ 3
651
+ []=
652
+ s
653
+ 1
654
+ B
655
+ s
656
+ 3
657
+ bee
658
+ s
659
+ 1
660
+ C
661
+ s
662
+ 3
663
+ see
664
+ x
665
+ 2
666
+ ==
667
+ p
668
+ 9
669
+ I
670
+ 0
671
+ I
672
+ 13
673
+ I
674
+ 0
675
+ I
676
+ 14
677
+ I
678
+ a
679
+ I
680
+ 15
681
+ I
682
+ 12
683
+ I
684
+ 16
685
+ I
686
+ 42
687
+ x
688
+ 32
689
+ ./spec/hamster/hash/each_spec.rb
690
+ p
691
+ 1
692
+ x
693
+ 12
694
+ actual_pairs
695
+ p
696
+ 7
697
+ I
698
+ 0
699
+ I
700
+ d
701
+ I
702
+ 0
703
+ I
704
+ f
705
+ I
706
+ b
707
+ I
708
+ 13
709
+ I
710
+ 16
711
+ x
712
+ 32
713
+ ./spec/hamster/hash/each_spec.rb
714
+ p
715
+ 0
716
+ x
717
+ 8
718
+ describe
719
+ s
720
+ 13
721
+ with no block
722
+ M
723
+ 1
724
+ n
725
+ n
726
+ x
727
+ 9
728
+ __block__
729
+ i
730
+ 11
731
+ 5
732
+ 7
733
+ 0
734
+ 60
735
+ 53
736
+ 1
737
+ 44
738
+ 47
739
+ 2
740
+ 1
741
+ 11
742
+ I
743
+ 4
744
+ I
745
+ 0
746
+ I
747
+ -1
748
+ I
749
+ -1
750
+ n
751
+ p
752
+ 3
753
+ s
754
+ 12
755
+ returns self
756
+ M
757
+ 1
758
+ n
759
+ n
760
+ x
761
+ 9
762
+ __block__
763
+ i
764
+ 15
765
+ 36
766
+ 0
767
+ 45
768
+ 1
769
+ 5
770
+ 36
771
+ 0
772
+ 44
773
+ 46
774
+ 2
775
+ 1
776
+ 46
777
+ 3
778
+ 1
779
+ 11
780
+ I
781
+ 4
782
+ I
783
+ 0
784
+ I
785
+ -1
786
+ I
787
+ -1
788
+ n
789
+ p
790
+ 4
791
+ x
792
+ 5
793
+ @hash
794
+ x
795
+ 4
796
+ each
797
+ x
798
+ 5
799
+ equal
800
+ x
801
+ 6
802
+ should
803
+ p
804
+ 5
805
+ I
806
+ 0
807
+ I
808
+ 1d
809
+ I
810
+ 0
811
+ I
812
+ 1e
813
+ I
814
+ f
815
+ x
816
+ 32
817
+ ./spec/hamster/hash/each_spec.rb
818
+ p
819
+ 0
820
+ x
821
+ 2
822
+ it
823
+ p
824
+ 5
825
+ I
826
+ 0
827
+ I
828
+ 1b
829
+ I
830
+ 0
831
+ I
832
+ 1d
833
+ I
834
+ b
835
+ x
836
+ 32
837
+ ./spec/hamster/hash/each_spec.rb
838
+ p
839
+ 0
840
+ p
841
+ 9
842
+ I
843
+ 0
844
+ I
845
+ 7
846
+ I
847
+ 0
848
+ I
849
+ 9
850
+ I
851
+ 8
852
+ I
853
+ d
854
+ I
855
+ 13
856
+ I
857
+ 1b
858
+ I
859
+ 1e
860
+ x
861
+ 32
862
+ ./spec/hamster/hash/each_spec.rb
863
+ p
864
+ 0
865
+ x
866
+ 8
867
+ describe
868
+ p
869
+ 5
870
+ I
871
+ 0
872
+ I
873
+ 5
874
+ I
875
+ 0
876
+ I
877
+ 7
878
+ I
879
+ b
880
+ x
881
+ 32
882
+ ./spec/hamster/hash/each_spec.rb
883
+ p
884
+ 0
885
+ x
886
+ 8
887
+ describe
888
+ p
889
+ 7
890
+ I
891
+ 0
892
+ I
893
+ 1
894
+ I
895
+ 1a
896
+ I
897
+ 3
898
+ I
899
+ 23
900
+ I
901
+ 5
902
+ I
903
+ 32
904
+ x
905
+ 32
906
+ ./spec/hamster/hash/each_spec.rb
907
+ p
908
+ 0