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,862 @@
1
+ !RBIX
2
+ 0
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 48
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
+ 53
53
+ 12
54
+ 44
55
+ 47
56
+ 13
57
+ 1
58
+ 14
59
+ 2
60
+ 11
61
+ I
62
+ 4
63
+ I
64
+ 0
65
+ I
66
+ 0
67
+ I
68
+ 0
69
+ n
70
+ p
71
+ 14
72
+ x
73
+ 4
74
+ File
75
+ n
76
+ n
77
+ x
78
+ 11
79
+ active_path
80
+ x
81
+ 7
82
+ dirname
83
+ s
84
+ 18
85
+ /../../spec_helper
86
+ x
87
+ 1
88
+ +
89
+ x
90
+ 11
91
+ expand_path
92
+ x
93
+ 7
94
+ require
95
+ s
96
+ 13
97
+ hamster/stack
98
+ x
99
+ 7
100
+ Hamster
101
+ n
102
+ M
103
+ 1
104
+ n
105
+ n
106
+ x
107
+ 9
108
+ __block__
109
+ i
110
+ 11
111
+ 5
112
+ 7
113
+ 0
114
+ 60
115
+ 53
116
+ 1
117
+ 44
118
+ 47
119
+ 2
120
+ 1
121
+ 11
122
+ I
123
+ 4
124
+ I
125
+ 0
126
+ I
127
+ -1
128
+ I
129
+ -1
130
+ n
131
+ p
132
+ 3
133
+ s
134
+ 6
135
+ .stack
136
+ M
137
+ 1
138
+ n
139
+ n
140
+ x
141
+ 9
142
+ __block__
143
+ i
144
+ 22
145
+ 5
146
+ 7
147
+ 0
148
+ 60
149
+ 53
150
+ 1
151
+ 44
152
+ 47
153
+ 2
154
+ 1
155
+ 14
156
+ 5
157
+ 7
158
+ 3
159
+ 60
160
+ 53
161
+ 4
162
+ 44
163
+ 47
164
+ 2
165
+ 1
166
+ 11
167
+ I
168
+ 4
169
+ I
170
+ 0
171
+ I
172
+ -1
173
+ I
174
+ -1
175
+ n
176
+ p
177
+ 5
178
+ s
179
+ 17
180
+ with no arguments
181
+ M
182
+ 1
183
+ n
184
+ n
185
+ x
186
+ 9
187
+ __block__
188
+ i
189
+ 30
190
+ 5
191
+ 53
192
+ 0
193
+ 44
194
+ 47
195
+ 1
196
+ 0
197
+ 14
198
+ 5
199
+ 7
200
+ 2
201
+ 60
202
+ 53
203
+ 3
204
+ 44
205
+ 47
206
+ 4
207
+ 1
208
+ 14
209
+ 5
210
+ 7
211
+ 5
212
+ 60
213
+ 53
214
+ 6
215
+ 44
216
+ 47
217
+ 4
218
+ 1
219
+ 11
220
+ I
221
+ 4
222
+ I
223
+ 0
224
+ I
225
+ -1
226
+ I
227
+ -1
228
+ n
229
+ p
230
+ 7
231
+ M
232
+ 1
233
+ n
234
+ n
235
+ x
236
+ 9
237
+ __block__
238
+ i
239
+ 8
240
+ 42
241
+ 0
242
+ 1
243
+ 45
244
+ 2
245
+ 35
246
+ 3
247
+ 11
248
+ I
249
+ 2
250
+ I
251
+ 0
252
+ I
253
+ -1
254
+ I
255
+ -1
256
+ n
257
+ p
258
+ 4
259
+ x
260
+ 7
261
+ Hamster
262
+ n
263
+ x
264
+ 5
265
+ stack
266
+ x
267
+ 6
268
+ @stack
269
+ p
270
+ 5
271
+ I
272
+ 0
273
+ I
274
+ b
275
+ I
276
+ 0
277
+ I
278
+ c
279
+ I
280
+ 8
281
+ x
282
+ 41
283
+ ./spec/hamster/stack/construction_spec.rb
284
+ p
285
+ 0
286
+ x
287
+ 6
288
+ before
289
+ s
290
+ 32
291
+ always returns the same instance
292
+ M
293
+ 1
294
+ n
295
+ n
296
+ x
297
+ 9
298
+ __block__
299
+ i
300
+ 16
301
+ 36
302
+ 0
303
+ 5
304
+ 42
305
+ 1
306
+ 2
307
+ 45
308
+ 3
309
+ 44
310
+ 46
311
+ 4
312
+ 1
313
+ 46
314
+ 5
315
+ 1
316
+ 11
317
+ I
318
+ 4
319
+ I
320
+ 0
321
+ I
322
+ -1
323
+ I
324
+ -1
325
+ n
326
+ p
327
+ 6
328
+ x
329
+ 6
330
+ @stack
331
+ x
332
+ 7
333
+ Hamster
334
+ n
335
+ x
336
+ 5
337
+ stack
338
+ x
339
+ 5
340
+ equal
341
+ x
342
+ 6
343
+ should
344
+ p
345
+ 5
346
+ I
347
+ 0
348
+ I
349
+ f
350
+ I
351
+ 0
352
+ I
353
+ 10
354
+ I
355
+ 10
356
+ x
357
+ 41
358
+ ./spec/hamster/stack/construction_spec.rb
359
+ p
360
+ 0
361
+ x
362
+ 2
363
+ it
364
+ s
365
+ 22
366
+ returns an empty stack
367
+ M
368
+ 1
369
+ n
370
+ n
371
+ x
372
+ 9
373
+ __block__
374
+ i
375
+ 10
376
+ 36
377
+ 0
378
+ 5
379
+ 44
380
+ 45
381
+ 1
382
+ 46
383
+ 2
384
+ 1
385
+ 11
386
+ I
387
+ 3
388
+ I
389
+ 0
390
+ I
391
+ -1
392
+ I
393
+ -1
394
+ n
395
+ p
396
+ 3
397
+ x
398
+ 6
399
+ @stack
400
+ x
401
+ 8
402
+ be_empty
403
+ x
404
+ 6
405
+ should
406
+ p
407
+ 5
408
+ I
409
+ 0
410
+ I
411
+ 13
412
+ I
413
+ 0
414
+ I
415
+ 14
416
+ I
417
+ a
418
+ x
419
+ 41
420
+ ./spec/hamster/stack/construction_spec.rb
421
+ p
422
+ 0
423
+ p
424
+ 9
425
+ I
426
+ 0
427
+ I
428
+ 9
429
+ I
430
+ 0
431
+ I
432
+ b
433
+ I
434
+ 8
435
+ I
436
+ f
437
+ I
438
+ 13
439
+ I
440
+ 13
441
+ I
442
+ 1e
443
+ x
444
+ 41
445
+ ./spec/hamster/stack/construction_spec.rb
446
+ p
447
+ 0
448
+ x
449
+ 8
450
+ describe
451
+ s
452
+ 22
453
+ with a number of items
454
+ M
455
+ 1
456
+ n
457
+ n
458
+ x
459
+ 9
460
+ __block__
461
+ i
462
+ 30
463
+ 5
464
+ 53
465
+ 0
466
+ 44
467
+ 47
468
+ 1
469
+ 0
470
+ 14
471
+ 5
472
+ 7
473
+ 2
474
+ 60
475
+ 53
476
+ 3
477
+ 44
478
+ 47
479
+ 4
480
+ 1
481
+ 14
482
+ 5
483
+ 7
484
+ 5
485
+ 60
486
+ 53
487
+ 6
488
+ 44
489
+ 47
490
+ 4
491
+ 1
492
+ 11
493
+ I
494
+ 4
495
+ I
496
+ 0
497
+ I
498
+ -1
499
+ I
500
+ -1
501
+ n
502
+ p
503
+ 7
504
+ M
505
+ 1
506
+ n
507
+ n
508
+ x
509
+ 9
510
+ __block__
511
+ i
512
+ 18
513
+ 42
514
+ 0
515
+ 1
516
+ 7
517
+ 2
518
+ 60
519
+ 7
520
+ 3
521
+ 60
522
+ 7
523
+ 4
524
+ 60
525
+ 46
526
+ 5
527
+ 3
528
+ 35
529
+ 6
530
+ 11
531
+ I
532
+ 5
533
+ I
534
+ 0
535
+ I
536
+ -1
537
+ I
538
+ -1
539
+ n
540
+ p
541
+ 7
542
+ x
543
+ 7
544
+ Hamster
545
+ n
546
+ s
547
+ 1
548
+ A
549
+ s
550
+ 1
551
+ B
552
+ s
553
+ 1
554
+ C
555
+ x
556
+ 5
557
+ stack
558
+ x
559
+ 6
560
+ @stack
561
+ p
562
+ 5
563
+ I
564
+ 0
565
+ I
566
+ 1b
567
+ I
568
+ 0
569
+ I
570
+ 1c
571
+ I
572
+ 12
573
+ x
574
+ 41
575
+ ./spec/hamster/stack/construction_spec.rb
576
+ p
577
+ 0
578
+ x
579
+ 6
580
+ before
581
+ s
582
+ 35
583
+ always returns a different instance
584
+ M
585
+ 1
586
+ n
587
+ n
588
+ x
589
+ 9
590
+ __block__
591
+ i
592
+ 26
593
+ 36
594
+ 0
595
+ 5
596
+ 42
597
+ 1
598
+ 2
599
+ 7
600
+ 3
601
+ 60
602
+ 7
603
+ 4
604
+ 60
605
+ 7
606
+ 5
607
+ 60
608
+ 46
609
+ 6
610
+ 3
611
+ 44
612
+ 46
613
+ 7
614
+ 1
615
+ 46
616
+ 8
617
+ 1
618
+ 11
619
+ I
620
+ 7
621
+ I
622
+ 0
623
+ I
624
+ -1
625
+ I
626
+ -1
627
+ n
628
+ p
629
+ 9
630
+ x
631
+ 6
632
+ @stack
633
+ x
634
+ 7
635
+ Hamster
636
+ n
637
+ s
638
+ 1
639
+ A
640
+ s
641
+ 1
642
+ B
643
+ s
644
+ 1
645
+ C
646
+ x
647
+ 5
648
+ stack
649
+ x
650
+ 5
651
+ equal
652
+ x
653
+ 10
654
+ should_not
655
+ p
656
+ 5
657
+ I
658
+ 0
659
+ I
660
+ 1f
661
+ I
662
+ 0
663
+ I
664
+ 20
665
+ I
666
+ 1a
667
+ x
668
+ 41
669
+ ./spec/hamster/stack/construction_spec.rb
670
+ p
671
+ 0
672
+ x
673
+ 2
674
+ it
675
+ s
676
+ 37
677
+ is the same as repeatedly using #push
678
+ M
679
+ 1
680
+ n
681
+ n
682
+ x
683
+ 9
684
+ __block__
685
+ i
686
+ 30
687
+ 36
688
+ 0
689
+ 45
690
+ 1
691
+ 42
692
+ 2
693
+ 3
694
+ 45
695
+ 4
696
+ 7
697
+ 5
698
+ 60
699
+ 46
700
+ 6
701
+ 1
702
+ 7
703
+ 7
704
+ 60
705
+ 46
706
+ 6
707
+ 1
708
+ 7
709
+ 8
710
+ 60
711
+ 46
712
+ 6
713
+ 1
714
+ 79
715
+ 9
716
+ 11
717
+ I
718
+ 4
719
+ I
720
+ 0
721
+ I
722
+ -1
723
+ I
724
+ -1
725
+ n
726
+ p
727
+ 10
728
+ x
729
+ 6
730
+ @stack
731
+ x
732
+ 6
733
+ should
734
+ x
735
+ 7
736
+ Hamster
737
+ n
738
+ x
739
+ 5
740
+ stack
741
+ s
742
+ 1
743
+ A
744
+ x
745
+ 4
746
+ push
747
+ s
748
+ 1
749
+ B
750
+ s
751
+ 1
752
+ C
753
+ x
754
+ 2
755
+ ==
756
+ p
757
+ 5
758
+ I
759
+ 0
760
+ I
761
+ 23
762
+ I
763
+ 0
764
+ I
765
+ 24
766
+ I
767
+ 1e
768
+ x
769
+ 41
770
+ ./spec/hamster/stack/construction_spec.rb
771
+ p
772
+ 0
773
+ p
774
+ 9
775
+ I
776
+ 0
777
+ I
778
+ 19
779
+ I
780
+ 0
781
+ I
782
+ 1b
783
+ I
784
+ 8
785
+ I
786
+ 1f
787
+ I
788
+ 13
789
+ I
790
+ 23
791
+ I
792
+ 1e
793
+ x
794
+ 41
795
+ ./spec/hamster/stack/construction_spec.rb
796
+ p
797
+ 0
798
+ p
799
+ 7
800
+ I
801
+ 0
802
+ I
803
+ 7
804
+ I
805
+ 0
806
+ I
807
+ 9
808
+ I
809
+ b
810
+ I
811
+ 19
812
+ I
813
+ 16
814
+ x
815
+ 41
816
+ ./spec/hamster/stack/construction_spec.rb
817
+ p
818
+ 0
819
+ x
820
+ 8
821
+ describe
822
+ p
823
+ 5
824
+ I
825
+ 0
826
+ I
827
+ 5
828
+ I
829
+ 0
830
+ I
831
+ 7
832
+ I
833
+ b
834
+ x
835
+ 41
836
+ ./spec/hamster/stack/construction_spec.rb
837
+ p
838
+ 0
839
+ x
840
+ 8
841
+ describe
842
+ p
843
+ 7
844
+ I
845
+ 0
846
+ I
847
+ 1
848
+ I
849
+ 1a
850
+ I
851
+ 3
852
+ I
853
+ 23
854
+ I
855
+ 5
856
+ I
857
+ 30
858
+ x
859
+ 41
860
+ ./spec/hamster/stack/construction_spec.rb
861
+ p
862
+ 0