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