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