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
@@ -20,7 +20,7 @@ describe Hamster::Stack do
20
20
  @stack = Hamster.stack(*values)
21
21
  end
22
22
 
23
- it "returns #{expected}" do
23
+ it "returns #{expected.inspect}" do
24
24
  @stack.send(method).should == expected
25
25
  end
26
26
 
@@ -0,0 +1,650 @@
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
+ 13
99
+ hamster/stack
100
+ x
101
+ 7
102
+ Hamster
103
+ n
104
+ x
105
+ 5
106
+ Stack
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
+ size
142
+ x
143
+ 6
144
+ length
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
+ 36
201
+ 32
202
+ 0
203
+ 74
204
+ 32
205
+ 2
206
+ 7
207
+ 0
208
+ 60
209
+ 32
210
+ 1
211
+ 75
212
+ 32
213
+ 2
214
+ 7
215
+ 0
216
+ 60
217
+ 7
218
+ 1
219
+ 60
220
+ 7
221
+ 2
222
+ 60
223
+ 32
224
+ 3
225
+ 4
226
+ 3
227
+ 32
228
+ 2
229
+ 32
230
+ 3
231
+ 53
232
+ 3
233
+ 47
234
+ 4
235
+ 0
236
+ 11
237
+ I
238
+ 6
239
+ I
240
+ 0
241
+ I
242
+ -1
243
+ I
244
+ -1
245
+ n
246
+ p
247
+ 5
248
+ s
249
+ 1
250
+ A
251
+ s
252
+ 1
253
+ B
254
+ s
255
+ 1
256
+ C
257
+ M
258
+ 1
259
+ n
260
+ n
261
+ x
262
+ 9
263
+ __block__
264
+ i
265
+ 30
266
+ 55
267
+ 33
268
+ 34
269
+ 17
270
+ 0
271
+ 14
272
+ 34
273
+ 17
274
+ 1
275
+ 14
276
+ 14
277
+ 5
278
+ 18
279
+ 0
280
+ 45
281
+ 0
282
+ 44
283
+ 45
284
+ 1
285
+ 7
286
+ 2
287
+ 60
288
+ 59
289
+ 53
290
+ 3
291
+ 44
292
+ 47
293
+ 4
294
+ 1
295
+ 11
296
+ I
297
+ 6
298
+ I
299
+ 2
300
+ I
301
+ 2
302
+ I
303
+ 2
304
+ n
305
+ p
306
+ 5
307
+ x
308
+ 7
309
+ inspect
310
+ x
311
+ 4
312
+ to_s
313
+ s
314
+ 3
315
+ on
316
+ M
317
+ 1
318
+ n
319
+ n
320
+ x
321
+ 9
322
+ __block__
323
+ i
324
+ 28
325
+ 5
326
+ 53
327
+ 0
328
+ 44
329
+ 47
330
+ 1
331
+ 0
332
+ 14
333
+ 5
334
+ 19
335
+ 1
336
+ 1
337
+ 45
338
+ 2
339
+ 44
340
+ 45
341
+ 3
342
+ 7
343
+ 4
344
+ 60
345
+ 59
346
+ 53
347
+ 5
348
+ 44
349
+ 47
350
+ 6
351
+ 1
352
+ 11
353
+ I
354
+ 4
355
+ I
356
+ 0
357
+ I
358
+ -1
359
+ I
360
+ -1
361
+ n
362
+ p
363
+ 7
364
+ M
365
+ 1
366
+ n
367
+ n
368
+ x
369
+ 9
370
+ __block__
371
+ i
372
+ 14
373
+ 42
374
+ 0
375
+ 1
376
+ 19
377
+ 2
378
+ 0
379
+ 33
380
+ 1
381
+ 48
382
+ 2
383
+ 0
384
+ 35
385
+ 3
386
+ 11
387
+ I
388
+ 4
389
+ I
390
+ 0
391
+ I
392
+ -1
393
+ I
394
+ -1
395
+ n
396
+ p
397
+ 4
398
+ x
399
+ 7
400
+ Hamster
401
+ n
402
+ x
403
+ 5
404
+ stack
405
+ x
406
+ 6
407
+ @stack
408
+ p
409
+ 5
410
+ I
411
+ 0
412
+ I
413
+ 13
414
+ I
415
+ 0
416
+ I
417
+ 14
418
+ I
419
+ e
420
+ x
421
+ 33
422
+ ./spec/hamster/stack/size_spec.rb
423
+ p
424
+ 0
425
+ x
426
+ 6
427
+ before
428
+ x
429
+ 7
430
+ inspect
431
+ x
432
+ 4
433
+ to_s
434
+ s
435
+ 8
436
+ returns
437
+ M
438
+ 1
439
+ n
440
+ n
441
+ x
442
+ 9
443
+ __block__
444
+ i
445
+ 16
446
+ 36
447
+ 0
448
+ 19
449
+ 4
450
+ 0
451
+ 46
452
+ 1
453
+ 1
454
+ 45
455
+ 2
456
+ 19
457
+ 2
458
+ 1
459
+ 79
460
+ 3
461
+ 11
462
+ I
463
+ 3
464
+ I
465
+ 0
466
+ I
467
+ -1
468
+ I
469
+ -1
470
+ n
471
+ p
472
+ 4
473
+ x
474
+ 6
475
+ @stack
476
+ x
477
+ 4
478
+ send
479
+ x
480
+ 6
481
+ should
482
+ x
483
+ 2
484
+ ==
485
+ p
486
+ 5
487
+ I
488
+ 0
489
+ I
490
+ 17
491
+ I
492
+ 0
493
+ I
494
+ 18
495
+ I
496
+ 10
497
+ x
498
+ 33
499
+ ./spec/hamster/stack/size_spec.rb
500
+ p
501
+ 0
502
+ x
503
+ 2
504
+ it
505
+ p
506
+ 7
507
+ I
508
+ 0
509
+ I
510
+ 11
511
+ I
512
+ 0
513
+ I
514
+ 13
515
+ I
516
+ 8
517
+ I
518
+ 17
519
+ I
520
+ 1c
521
+ x
522
+ 33
523
+ ./spec/hamster/stack/size_spec.rb
524
+ p
525
+ 0
526
+ x
527
+ 8
528
+ describe
529
+ p
530
+ 7
531
+ I
532
+ 0
533
+ I
534
+ c
535
+ I
536
+ 3
537
+ I
538
+ f
539
+ I
540
+ b
541
+ I
542
+ 11
543
+ I
544
+ 1e
545
+ x
546
+ 33
547
+ ./spec/hamster/stack/size_spec.rb
548
+ p
549
+ 2
550
+ x
551
+ 6
552
+ values
553
+ x
554
+ 8
555
+ expected
556
+ x
557
+ 4
558
+ each
559
+ p
560
+ 9
561
+ I
562
+ 0
563
+ I
564
+ 9
565
+ I
566
+ 0
567
+ I
568
+ c
569
+ I
570
+ 5
571
+ I
572
+ d
573
+ I
574
+ d
575
+ I
576
+ e
577
+ I
578
+ 24
579
+ x
580
+ 33
581
+ ./spec/hamster/stack/size_spec.rb
582
+ p
583
+ 0
584
+ x
585
+ 8
586
+ describe
587
+ p
588
+ 5
589
+ I
590
+ 0
591
+ I
592
+ 7
593
+ I
594
+ 4
595
+ I
596
+ 9
597
+ I
598
+ 15
599
+ x
600
+ 33
601
+ ./spec/hamster/stack/size_spec.rb
602
+ p
603
+ 1
604
+ x
605
+ 6
606
+ method
607
+ x
608
+ 4
609
+ each
610
+ p
611
+ 5
612
+ I
613
+ 0
614
+ I
615
+ 5
616
+ I
617
+ 0
618
+ I
619
+ 7
620
+ I
621
+ c
622
+ x
623
+ 33
624
+ ./spec/hamster/stack/size_spec.rb
625
+ p
626
+ 0
627
+ x
628
+ 8
629
+ describe
630
+ p
631
+ 7
632
+ I
633
+ 0
634
+ I
635
+ 1
636
+ I
637
+ 1a
638
+ I
639
+ 3
640
+ I
641
+ 23
642
+ I
643
+ 5
644
+ I
645
+ 32
646
+ x
647
+ 33
648
+ ./spec/hamster/stack/size_spec.rb
649
+ p
650
+ 0