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