hamster 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. data/History.rdoc +10 -0
  2. data/LICENSE +1 -1
  3. data/README.rdoc +4 -1
  4. data/Rakefile +1 -1
  5. data/lib/hamster.rb +1 -0
  6. data/lib/hamster/core_ext/enumerable.rbc +676 -0
  7. data/lib/hamster/core_ext/io.rbc +657 -0
  8. data/lib/hamster/hash.rb +4 -0
  9. data/lib/hamster/hash.rbc +4160 -0
  10. data/lib/hamster/immutable.rbc +1664 -0
  11. data/lib/hamster/list.rbc +15902 -0
  12. data/lib/hamster/queue.rb +93 -0
  13. data/lib/hamster/read_copy_update.rb +36 -0
  14. data/lib/hamster/read_copy_update_hash.rb +8 -26
  15. data/lib/hamster/read_copy_update_list.rb +26 -0
  16. data/lib/hamster/read_copy_update_queue.rb +27 -0
  17. data/lib/hamster/read_copy_update_set.rb +7 -21
  18. data/lib/hamster/read_copy_update_stack.rb +8 -24
  19. data/lib/hamster/set.rbc +7865 -0
  20. data/lib/hamster/sorter.rb +2 -2
  21. data/lib/hamster/sorter.rbc +392 -0
  22. data/lib/hamster/stack.rb +4 -1
  23. data/lib/hamster/stack.rbc +1662 -0
  24. data/lib/hamster/trie.rbc +3563 -0
  25. data/lib/hamster/tuple.rbc +899 -0
  26. data/lib/hamster/undefined.rbc +280 -0
  27. data/lib/hamster/version.rb +1 -1
  28. data/spec/hamster/core_ext/array_spec.rb +1 -1
  29. data/spec/hamster/core_ext/array_spec.rbc +402 -0
  30. data/spec/hamster/core_ext/enumerable_spec.rb +1 -1
  31. data/spec/hamster/core_ext/enumerable_spec.rbc +726 -0
  32. data/spec/hamster/core_ext/io_spec.rb +1 -1
  33. data/spec/hamster/core_ext/io_spec.rbc +398 -0
  34. data/spec/hamster/hash/all_spec.rb +1 -1
  35. data/spec/hamster/hash/all_spec.rbc +1360 -0
  36. data/spec/hamster/hash/any_spec.rb +1 -1
  37. data/spec/hamster/hash/any_spec.rbc +1557 -0
  38. data/spec/hamster/hash/clear_spec.rb +36 -0
  39. data/spec/hamster/hash/construction_spec.rb +1 -1
  40. data/spec/hamster/hash/construction_spec.rbc +756 -0
  41. data/spec/hamster/hash/copying_spec.rb +1 -1
  42. data/spec/hamster/hash/copying_spec.rbc +514 -0
  43. data/spec/hamster/hash/delete_spec.rb +1 -1
  44. data/spec/hamster/hash/delete_spec.rbc +1167 -0
  45. data/spec/hamster/hash/each_spec.rb +1 -1
  46. data/spec/hamster/hash/each_spec.rbc +1016 -0
  47. data/spec/hamster/hash/empty_spec.rb +1 -1
  48. data/spec/hamster/hash/empty_spec.rbc +590 -0
  49. data/spec/hamster/hash/eql_spec.rb +1 -1
  50. data/spec/hamster/hash/eql_spec.rbc +1732 -0
  51. data/spec/hamster/hash/filter_spec.rb +1 -1
  52. data/spec/hamster/hash/filter_spec.rbc +1498 -0
  53. data/spec/hamster/hash/find_spec.rb +1 -1
  54. data/spec/hamster/hash/find_spec.rbc +1478 -0
  55. data/spec/hamster/hash/get_spec.rb +1 -1
  56. data/spec/hamster/hash/get_spec.rbc +796 -0
  57. data/spec/hamster/hash/has_key_spec.rb +1 -1
  58. data/spec/hamster/hash/has_key_spec.rbc +826 -0
  59. data/spec/hamster/hash/hash_spec.rb +6 -6
  60. data/spec/hamster/hash/hash_spec.rbc +975 -0
  61. data/spec/hamster/hash/immutable_spec.rb +1 -1
  62. data/spec/hamster/hash/immutable_spec.rbc +251 -0
  63. data/spec/hamster/hash/inspect_spec.rb +2 -2
  64. data/spec/hamster/hash/inspect_spec.rbc +769 -0
  65. data/spec/hamster/hash/keys_spec.rb +1 -1
  66. data/spec/hamster/hash/keys_spec.rbc +484 -0
  67. data/spec/hamster/hash/map_spec.rb +1 -1
  68. data/spec/hamster/hash/map_spec.rbc +1520 -0
  69. data/spec/hamster/hash/merge_spec.rb +1 -1
  70. data/spec/hamster/hash/merge_spec.rbc +881 -0
  71. data/spec/hamster/hash/none_spec.rb +1 -1
  72. data/spec/hamster/hash/none_spec.rbc +1456 -0
  73. data/spec/hamster/hash/put_spec.rb +1 -1
  74. data/spec/hamster/hash/put_spec.rbc +1799 -0
  75. data/spec/hamster/hash/reduce_spec.rb +1 -1
  76. data/spec/hamster/hash/reduce_spec.rbc +1299 -0
  77. data/spec/hamster/hash/remove_spec.rb +1 -1
  78. data/spec/hamster/hash/remove_spec.rbc +1515 -0
  79. data/spec/hamster/hash/size_spec.rb +1 -1
  80. data/spec/hamster/hash/size_spec.rbc +591 -0
  81. data/spec/hamster/hash/uniq_spec.rb +1 -1
  82. data/spec/hamster/hash/uniq_spec.rbc +519 -0
  83. data/spec/hamster/immutable/copying_spec.rb +1 -1
  84. data/spec/hamster/immutable/copying_spec.rbc +589 -0
  85. data/spec/hamster/immutable/immutable_spec.rb +1 -1
  86. data/spec/hamster/immutable/immutable_spec.rbc +1152 -0
  87. data/spec/hamster/immutable/memoize_spec.rb +1 -1
  88. data/spec/hamster/immutable/memoize_spec.rbc +1256 -0
  89. data/spec/hamster/immutable/new_spec.rb +3 -3
  90. data/spec/hamster/immutable/new_spec.rbc +662 -0
  91. data/spec/hamster/immutable/transform_spec.rb +3 -3
  92. data/spec/hamster/immutable/transform_spec.rbc +796 -0
  93. data/spec/hamster/immutable/transform_unless_spec.rb +3 -3
  94. data/spec/hamster/immutable/transform_unless_spec.rbc +1302 -0
  95. data/spec/hamster/list/all_spec.rb +1 -1
  96. data/spec/hamster/list/all_spec.rbc +2275 -0
  97. data/spec/hamster/list/any_spec.rb +1 -1
  98. data/spec/hamster/list/any_spec.rbc +1833 -0
  99. data/spec/hamster/list/append_spec.rb +1 -1
  100. data/spec/hamster/list/append_spec.rbc +1226 -0
  101. data/spec/hamster/list/at_spec.rb +1 -1
  102. data/spec/hamster/list/at_spec.rbc +1008 -0
  103. data/spec/hamster/list/break_spec.rb +1 -1
  104. data/spec/hamster/list/break_spec.rbc +1876 -0
  105. data/spec/hamster/list/cadr_spec.rb +1 -1
  106. data/spec/hamster/list/cadr_spec.rbc +1074 -0
  107. data/spec/hamster/list/chunk_spec.rb +1 -1
  108. data/spec/hamster/list/chunk_spec.rbc +939 -0
  109. data/spec/hamster/list/clear_spec.rb +2 -2
  110. data/spec/hamster/list/clear_spec.rbc +644 -0
  111. data/spec/hamster/list/combinations_spec.rb +1 -1
  112. data/spec/hamster/list/combinations_spec.rbc +1335 -0
  113. data/spec/hamster/list/compact_spec.rb +1 -1
  114. data/spec/hamster/list/compact_spec.rbc +1006 -0
  115. data/spec/hamster/list/cons_spec.rb +1 -1
  116. data/spec/hamster/list/cons_spec.rbc +861 -0
  117. data/spec/hamster/list/construction_spec.rb +1 -1
  118. data/spec/hamster/list/construction_spec.rbc +3098 -0
  119. data/spec/hamster/list/copying_spec.rb +1 -1
  120. data/spec/hamster/list/copying_spec.rbc +574 -0
  121. data/spec/hamster/list/count_spec.rb +1 -1
  122. data/spec/hamster/list/count_spec.rbc +1260 -0
  123. data/spec/hamster/list/cycle_spec.rb +1 -1
  124. data/spec/hamster/list/cycle_spec.rbc +1029 -0
  125. data/spec/hamster/list/drop_spec.rb +1 -1
  126. data/spec/hamster/list/drop_spec.rbc +968 -0
  127. data/spec/hamster/list/drop_while_spec.rb +1 -1
  128. data/spec/hamster/list/drop_while_spec.rbc +1342 -0
  129. data/spec/hamster/list/each_slice_spec.rb +1 -1
  130. data/spec/hamster/list/each_slice_spec.rbc +1730 -0
  131. data/spec/hamster/list/each_spec.rb +1 -1
  132. data/spec/hamster/list/each_spec.rbc +1464 -0
  133. data/spec/hamster/list/elem_index_spec.rb +1 -1
  134. data/spec/hamster/list/elem_index_spec.rbc +1137 -0
  135. data/spec/hamster/list/elem_indices_spec.rb +1 -1
  136. data/spec/hamster/list/elem_indices_spec.rbc +1006 -0
  137. data/spec/hamster/list/empty_spec.rb +1 -1
  138. data/spec/hamster/list/empty_spec.rbc +970 -0
  139. data/spec/hamster/list/eql_spec.rb +1 -1
  140. data/spec/hamster/list/eql_spec.rbc +1722 -0
  141. data/spec/hamster/list/filter_spec.rb +1 -1
  142. data/spec/hamster/list/filter_spec.rbc +1430 -0
  143. data/spec/hamster/list/find_index_spec.rb +1 -1
  144. data/spec/hamster/list/find_index_spec.rbc +1240 -0
  145. data/spec/hamster/list/find_indices_spec.rb +1 -1
  146. data/spec/hamster/list/find_indices_spec.rbc +1109 -0
  147. data/spec/hamster/list/find_spec.rb +1 -1
  148. data/spec/hamster/list/find_spec.rbc +1369 -0
  149. data/spec/hamster/list/flatten_spec.rb +1 -1
  150. data/spec/hamster/list/flatten_spec.rbc +973 -0
  151. data/spec/hamster/list/grep_spec.rb +1 -1
  152. data/spec/hamster/list/grep_spec.rbc +1577 -0
  153. data/spec/hamster/list/group_by_spec.rb +1 -1
  154. data/spec/hamster/list/group_by_spec.rbc +1588 -0
  155. data/spec/hamster/list/hash_spec.rb +6 -6
  156. data/spec/hamster/list/hash_spec.rbc +935 -0
  157. data/spec/hamster/list/head_spec.rb +1 -1
  158. data/spec/hamster/list/head_spec.rbc +971 -0
  159. data/spec/hamster/list/include_spec.rb +1 -1
  160. data/spec/hamster/list/include_spec.rbc +1123 -0
  161. data/spec/hamster/list/init_spec.rb +1 -1
  162. data/spec/hamster/list/init_spec.rbc +896 -0
  163. data/spec/hamster/list/inits_spec.rb +1 -1
  164. data/spec/hamster/list/inits_spec.rbc +1011 -0
  165. data/spec/hamster/list/inspect_spec.rb +1 -1
  166. data/spec/hamster/list/inspect_spec.rbc +874 -0
  167. data/spec/hamster/list/intersperse_spec.rb +1 -1
  168. data/spec/hamster/list/intersperse_spec.rbc +931 -0
  169. data/spec/hamster/list/join_spec.rb +1 -1
  170. data/spec/hamster/list/join_spec.rbc +1599 -0
  171. data/spec/hamster/list/last_spec.rb +1 -1
  172. data/spec/hamster/list/last_spec.rbc +875 -0
  173. data/spec/hamster/list/map_spec.rb +1 -1
  174. data/spec/hamster/list/map_spec.rbc +1613 -0
  175. data/spec/hamster/list/maximum_spec.rb +1 -1
  176. data/spec/hamster/list/maximum_spec.rbc +1558 -0
  177. data/spec/hamster/list/minimum_spec.rb +1 -1
  178. data/spec/hamster/list/minimum_spec.rbc +1558 -0
  179. data/spec/hamster/list/none_spec.rb +1 -1
  180. data/spec/hamster/list/none_spec.rbc +1725 -0
  181. data/spec/hamster/list/one_spec.rb +1 -1
  182. data/spec/hamster/list/one_spec.rbc +1747 -0
  183. data/spec/hamster/list/partition_spec.rb +1 -1
  184. data/spec/hamster/list/partition_spec.rbc +1582 -0
  185. data/spec/hamster/list/product_spec.rb +1 -1
  186. data/spec/hamster/list/product_spec.rbc +863 -0
  187. data/spec/hamster/list/reduce_spec.rb +1 -1
  188. data/spec/hamster/list/reduce_spec.rbc +2032 -0
  189. data/spec/hamster/list/remove_spec.rb +1 -1
  190. data/spec/hamster/list/remove_spec.rbc +1578 -0
  191. data/spec/hamster/list/reverse_spec.rb +1 -1
  192. data/spec/hamster/list/reverse_spec.rbc +1247 -0
  193. data/spec/hamster/list/size_spec.rb +1 -1
  194. data/spec/hamster/list/size_spec.rbc +943 -0
  195. data/spec/hamster/list/slice_spec.rb +1 -1
  196. data/spec/hamster/list/slice_spec.rbc +1133 -0
  197. data/spec/hamster/list/sorting_spec.rb +1 -1
  198. data/spec/hamster/list/sorting_spec.rbc +1677 -0
  199. data/spec/hamster/list/span_spec.rb +1 -1
  200. data/spec/hamster/list/span_spec.rbc +1788 -0
  201. data/spec/hamster/list/split_at_spec.rb +1 -1
  202. data/spec/hamster/list/split_at_spec.rbc +1168 -0
  203. data/spec/hamster/list/sum_spec.rb +1 -1
  204. data/spec/hamster/list/sum_spec.rbc +861 -0
  205. data/spec/hamster/list/tail_spec.rb +1 -1
  206. data/spec/hamster/list/tail_spec.rbc +1018 -0
  207. data/spec/hamster/list/tails_spec.rb +1 -1
  208. data/spec/hamster/list/tails_spec.rbc +1011 -0
  209. data/spec/hamster/list/take_spec.rb +1 -1
  210. data/spec/hamster/list/take_spec.rbc +962 -0
  211. data/spec/hamster/list/take_while_spec.rb +1 -1
  212. data/spec/hamster/list/take_while_spec.rbc +1456 -0
  213. data/spec/hamster/list/to_a_spec.rb +1 -1
  214. data/spec/hamster/list/to_a_spec.rbc +1058 -0
  215. data/spec/hamster/list/to_ary_spec.rb +1 -1
  216. data/spec/hamster/list/to_ary_spec.rbc +1270 -0
  217. data/spec/hamster/list/to_list_spec.rb +1 -1
  218. data/spec/hamster/list/to_list_spec.rbc +560 -0
  219. data/spec/hamster/list/to_set_spec.rb +1 -1
  220. data/spec/hamster/list/to_set_spec.rbc +585 -0
  221. data/spec/hamster/list/union_spec.rb +1 -1
  222. data/spec/hamster/list/union_spec.rbc +1189 -0
  223. data/spec/hamster/list/uniq_spec.rb +1 -1
  224. data/spec/hamster/list/uniq_spec.rbc +1030 -0
  225. data/spec/hamster/list/zip_spec.rb +1 -1
  226. data/spec/hamster/list/zip_spec.rbc +1039 -0
  227. data/spec/hamster/queue/clear_spec.rb +36 -0
  228. data/spec/hamster/queue/construction_spec.rb +43 -0
  229. data/spec/hamster/queue/dequeue_spec.rb +40 -0
  230. data/spec/hamster/queue/empty_spec.rb +47 -0
  231. data/spec/hamster/queue/enqueue_spec.rb +41 -0
  232. data/spec/hamster/queue/head_spec.rb +35 -0
  233. data/spec/hamster/queue/inspect_spec.rb +31 -0
  234. data/spec/hamster/queue/size_spec.rb +35 -0
  235. data/spec/hamster/queue/to_a_spec.rb +42 -0
  236. data/spec/hamster/queue/to_ary_spec.rb +44 -0
  237. data/spec/hamster/queue/to_list_spec.rb +44 -0
  238. data/spec/hamster/set/add_spec.rb +1 -1
  239. data/spec/hamster/set/add_spec.rbc +1076 -0
  240. data/spec/hamster/set/all_spec.rb +1 -1
  241. data/spec/hamster/set/all_spec.rbc +1475 -0
  242. data/spec/hamster/set/any_spec.rb +1 -1
  243. data/spec/hamster/set/any_spec.rbc +1506 -0
  244. data/spec/hamster/set/clear_spec.rb +2 -2
  245. data/spec/hamster/set/clear_spec.rbc +644 -0
  246. data/spec/hamster/set/compact_spec.rb +1 -1
  247. data/spec/hamster/set/compact_spec.rbc +811 -0
  248. data/spec/hamster/set/construction_spec.rb +1 -1
  249. data/spec/hamster/set/construction_spec.rbc +412 -0
  250. data/spec/hamster/set/copying_spec.rb +1 -1
  251. data/spec/hamster/set/copying_spec.rbc +464 -0
  252. data/spec/hamster/set/count_spec.rb +1 -1
  253. data/spec/hamster/set/count_spec.rbc +977 -0
  254. data/spec/hamster/set/delete_spec.rb +1 -1
  255. data/spec/hamster/set/delete_spec.rbc +979 -0
  256. data/spec/hamster/set/difference_spec.rb +1 -1
  257. data/spec/hamster/set/difference_spec.rbc +784 -0
  258. data/spec/hamster/set/each_spec.rb +1 -1
  259. data/spec/hamster/set/each_spec.rbc +928 -0
  260. data/spec/hamster/set/empty_spec.rb +1 -1
  261. data/spec/hamster/set/empty_spec.rbc +659 -0
  262. data/spec/hamster/set/eql_spec.rb +1 -1
  263. data/spec/hamster/set/eql_spec.rbc +1339 -0
  264. data/spec/hamster/set/exclusion_spec.rb +1 -1
  265. data/spec/hamster/set/exclusion_spec.rbc +837 -0
  266. data/spec/hamster/set/filter_spec.rb +1 -1
  267. data/spec/hamster/set/filter_spec.rbc +1337 -0
  268. data/spec/hamster/set/find_spec.rb +1 -1
  269. data/spec/hamster/set/find_spec.rbc +1039 -0
  270. data/spec/hamster/set/flatten_spec.rb +1 -1
  271. data/spec/hamster/set/flatten_spec.rbc +778 -0
  272. data/spec/hamster/set/grep_spec.rb +1 -1
  273. data/spec/hamster/set/grep_spec.rbc +1217 -0
  274. data/spec/hamster/set/group_by_spec.rb +1 -1
  275. data/spec/hamster/set/group_by_spec.rbc +1308 -0
  276. data/spec/hamster/set/hash_spec.rb +6 -6
  277. data/spec/hamster/set/hash_spec.rbc +655 -0
  278. data/spec/hamster/set/head_spec.rb +17 -14
  279. data/spec/hamster/set/head_spec.rbc +767 -0
  280. data/spec/hamster/set/immutable_spec.rb +1 -1
  281. data/spec/hamster/set/immutable_spec.rbc +251 -0
  282. data/spec/hamster/set/include_spec.rb +1 -1
  283. data/spec/hamster/set/include_spec.rbc +763 -0
  284. data/spec/hamster/set/inspect_spec.rb +2 -2
  285. data/spec/hamster/set/inspect_spec.rbc +704 -0
  286. data/spec/hamster/set/intersection_spec.rb +1 -1
  287. data/spec/hamster/set/intersection_spec.rbc +966 -0
  288. data/spec/hamster/set/join_spec.rb +3 -3
  289. data/spec/hamster/set/join_spec.rbc +1521 -0
  290. data/spec/hamster/set/map_spec.rb +1 -1
  291. data/spec/hamster/set/map_spec.rbc +1351 -0
  292. data/spec/hamster/set/maximum_spec.rb +1 -1
  293. data/spec/hamster/set/maximum_spec.rbc +1274 -0
  294. data/spec/hamster/set/minimum_spec.rb +1 -1
  295. data/spec/hamster/set/minimum_spec.rbc +1274 -0
  296. data/spec/hamster/set/none_spec.rb +1 -1
  297. data/spec/hamster/set/none_spec.rbc +1401 -0
  298. data/spec/hamster/set/one_spec.rb +1 -1
  299. data/spec/hamster/set/one_spec.rbc +1423 -0
  300. data/spec/hamster/set/partition_spec.rb +1 -1
  301. data/spec/hamster/set/partition_spec.rbc +1387 -0
  302. data/spec/hamster/set/product_spec.rb +1 -1
  303. data/spec/hamster/set/product_spec.rbc +580 -0
  304. data/spec/hamster/set/reduce_spec.rb +3 -3
  305. data/spec/hamster/set/reduce_spec.rbc +1724 -0
  306. data/spec/hamster/set/remove_spec.rb +1 -1
  307. data/spec/hamster/set/remove_spec.rbc +1343 -0
  308. data/spec/hamster/set/size_spec.rb +1 -1
  309. data/spec/hamster/set/size_spec.rbc +526 -0
  310. data/spec/hamster/set/sorting_spec.rb +1 -1
  311. data/spec/hamster/set/sorting_spec.rbc +1268 -0
  312. data/spec/hamster/set/subset_spec.rb +1 -1
  313. data/spec/hamster/set/subset_spec.rbc +814 -0
  314. data/spec/hamster/set/sum_spec.rb +1 -1
  315. data/spec/hamster/set/sum_spec.rbc +578 -0
  316. data/spec/hamster/set/superset_spec.rb +1 -1
  317. data/spec/hamster/set/superset_spec.rbc +814 -0
  318. data/spec/hamster/set/to_a_spec.rb +1 -1
  319. data/spec/hamster/set/to_a_spec.rbc +782 -0
  320. data/spec/hamster/set/to_list_spec.rb +1 -1
  321. data/spec/hamster/set/to_list_spec.rbc +880 -0
  322. data/spec/hamster/set/to_set_spec.rb +1 -1
  323. data/spec/hamster/set/to_set_spec.rbc +560 -0
  324. data/spec/hamster/set/union_spec.rb +1 -1
  325. data/spec/hamster/set/union_spec.rbc +944 -0
  326. data/spec/hamster/set/uniq_spec.rb +1 -1
  327. data/spec/hamster/set/uniq_spec.rbc +469 -0
  328. data/spec/hamster/sorter/immutable_spec.rb +1 -1
  329. data/spec/hamster/sorter/immutable_spec.rbc +251 -0
  330. data/spec/hamster/stack/clear_spec.rb +2 -2
  331. data/spec/hamster/stack/clear_spec.rbc +644 -0
  332. data/spec/hamster/stack/construction_spec.rb +1 -1
  333. data/spec/hamster/stack/construction_spec.rbc +888 -0
  334. data/spec/hamster/stack/copying_spec.rb +1 -1
  335. data/spec/hamster/stack/copying_spec.rbc +559 -0
  336. data/spec/hamster/stack/empty_spec.rb +1 -1
  337. data/spec/hamster/stack/empty_spec.rbc +576 -0
  338. data/spec/hamster/stack/eql_spec.rb +1 -1
  339. data/spec/hamster/stack/eql_spec.rbc +1311 -0
  340. data/spec/hamster/stack/immutable_spec.rb +1 -1
  341. data/spec/hamster/stack/immutable_spec.rbc +251 -0
  342. data/spec/hamster/stack/inspect_spec.rb +1 -1
  343. data/spec/hamster/stack/inspect_spec.rbc +591 -0
  344. data/spec/hamster/stack/peek_spec.rb +40 -0
  345. data/spec/hamster/stack/peek_spec.rbc +770 -0
  346. data/spec/hamster/stack/pop_spec.rb +35 -31
  347. data/spec/hamster/stack/pop_spec.rbc +1217 -0
  348. data/spec/hamster/stack/push_spec.rb +2 -2
  349. data/spec/hamster/stack/push_spec.rbc +866 -0
  350. data/spec/hamster/stack/size_spec.rb +1 -1
  351. data/spec/hamster/stack/size_spec.rbc +660 -0
  352. data/spec/hamster/stack/to_a_spec.rb +1 -1
  353. data/spec/hamster/stack/to_a_spec.rbc +809 -0
  354. data/spec/hamster/stack/to_ary.rb +1 -1
  355. data/spec/hamster/stack/to_list_spec.rb +1 -1
  356. data/spec/hamster/stack/to_list_spec.rbc +634 -0
  357. data/spec/hamster/trie/remove_spec.rb +1 -1
  358. data/spec/hamster/trie/remove_spec.rbc +40 -0
  359. data/spec/hamster/tuple/copying_spec.rb +1 -1
  360. data/spec/hamster/tuple/copying_spec.rbc +502 -0
  361. data/spec/hamster/tuple/eql_spec.rb +1 -1
  362. data/spec/hamster/tuple/eql_spec.rbc +1356 -0
  363. data/spec/hamster/tuple/first_spec.rb +1 -1
  364. data/spec/hamster/tuple/first_spec.rbc +409 -0
  365. data/spec/hamster/tuple/immutable_spec.rb +1 -1
  366. data/spec/hamster/tuple/immutable_spec.rbc +251 -0
  367. data/spec/hamster/tuple/inspect_spec.rb +1 -1
  368. data/spec/hamster/tuple/inspect_spec.rbc +409 -0
  369. data/spec/hamster/tuple/last_spec.rb +1 -1
  370. data/spec/hamster/tuple/last_spec.rbc +409 -0
  371. data/spec/hamster/tuple/to_a_spec.rb +1 -1
  372. data/spec/hamster/tuple/to_a_spec.rbc +697 -0
  373. data/spec/hamster/tuple/to_ary_spec.rb +1 -1
  374. data/spec/hamster/tuple/to_ary_spec.rbc +1030 -0
  375. data/spec/hamster/undefined/erase_spec.rb +1 -1
  376. data/spec/hamster/undefined/erase_spec.rbc +880 -0
  377. data/spec/spec_helper.rb +24 -1
  378. data/spec/spec_helper.rbc +639 -0
  379. data/tasks/spec.rbc +206 -0
  380. metadata +201 -4
  381. data/spec/hamster/stack/top_spec.rb +0 -36
@@ -1,4 +1,4 @@
1
- require File.expand_path('../../../spec_helper', __FILE__)
1
+ require 'spec_helper'
2
2
 
3
3
  require 'hamster/immutable'
4
4
 
@@ -0,0 +1,1152 @@
1
+ !RBIX
2
+ 0
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 33
13
+ 5
14
+ 7
15
+ 0
16
+ 64
17
+ 47
18
+ 49
19
+ 1
20
+ 1
21
+ 15
22
+ 5
23
+ 7
24
+ 2
25
+ 64
26
+ 47
27
+ 49
28
+ 1
29
+ 1
30
+ 15
31
+ 5
32
+ 45
33
+ 3
34
+ 4
35
+ 43
36
+ 5
37
+ 56
38
+ 6
39
+ 47
40
+ 50
41
+ 7
42
+ 1
43
+ 15
44
+ 2
45
+ 11
46
+ I
47
+ 3
48
+ I
49
+ 0
50
+ I
51
+ 0
52
+ I
53
+ 0
54
+ n
55
+ p
56
+ 8
57
+ s
58
+ 11
59
+ spec_helper
60
+ x
61
+ 7
62
+ require
63
+ s
64
+ 17
65
+ hamster/immutable
66
+ x
67
+ 7
68
+ Hamster
69
+ n
70
+ x
71
+ 9
72
+ Immutable
73
+ M
74
+ 1
75
+ p
76
+ 2
77
+ x
78
+ 9
79
+ for_block
80
+ t
81
+ n
82
+ x
83
+ 9
84
+ __block__
85
+ i
86
+ 11
87
+ 5
88
+ 7
89
+ 0
90
+ 64
91
+ 56
92
+ 1
93
+ 47
94
+ 50
95
+ 2
96
+ 1
97
+ 11
98
+ I
99
+ 4
100
+ I
101
+ 0
102
+ I
103
+ 0
104
+ I
105
+ 0
106
+ I
107
+ -2
108
+ p
109
+ 3
110
+ s
111
+ 11
112
+ #immutable?
113
+ M
114
+ 1
115
+ p
116
+ 2
117
+ x
118
+ 9
119
+ for_block
120
+ t
121
+ n
122
+ x
123
+ 9
124
+ __block__
125
+ i
126
+ 22
127
+ 5
128
+ 7
129
+ 0
130
+ 64
131
+ 56
132
+ 1
133
+ 47
134
+ 50
135
+ 2
136
+ 1
137
+ 15
138
+ 5
139
+ 7
140
+ 3
141
+ 64
142
+ 56
143
+ 4
144
+ 47
145
+ 50
146
+ 2
147
+ 1
148
+ 11
149
+ I
150
+ 4
151
+ I
152
+ 0
153
+ I
154
+ 0
155
+ I
156
+ 0
157
+ I
158
+ -2
159
+ p
160
+ 5
161
+ s
162
+ 52
163
+ object constructed after its class becomes Immutable
164
+ M
165
+ 1
166
+ p
167
+ 2
168
+ x
169
+ 9
170
+ for_block
171
+ t
172
+ n
173
+ x
174
+ 9
175
+ __block__
176
+ i
177
+ 49
178
+ 45
179
+ 0
180
+ 1
181
+ 7
182
+ 2
183
+ 1
184
+ 65
185
+ 49
186
+ 3
187
+ 3
188
+ 13
189
+ 45
190
+ 0
191
+ 4
192
+ 12
193
+ 7
194
+ 5
195
+ 12
196
+ 7
197
+ 6
198
+ 12
199
+ 65
200
+ 12
201
+ 49
202
+ 7
203
+ 4
204
+ 15
205
+ 48
206
+ 5
207
+ 15
208
+ 5
209
+ 56
210
+ 8
211
+ 47
212
+ 50
213
+ 9
214
+ 0
215
+ 15
216
+ 5
217
+ 7
218
+ 10
219
+ 64
220
+ 56
221
+ 11
222
+ 47
223
+ 50
224
+ 12
225
+ 1
226
+ 11
227
+ I
228
+ 7
229
+ I
230
+ 0
231
+ I
232
+ 0
233
+ I
234
+ 0
235
+ I
236
+ -2
237
+ p
238
+ 13
239
+ x
240
+ 8
241
+ Rubinius
242
+ n
243
+ x
244
+ 7
245
+ Fixture
246
+ x
247
+ 10
248
+ open_class
249
+ n
250
+ x
251
+ 14
252
+ __class_init__
253
+ M
254
+ 1
255
+ n
256
+ n
257
+ x
258
+ 7
259
+ Fixture
260
+ i
261
+ 13
262
+ 5
263
+ 66
264
+ 5
265
+ 45
266
+ 0
267
+ 1
268
+ 43
269
+ 2
270
+ 47
271
+ 49
272
+ 3
273
+ 1
274
+ 11
275
+ I
276
+ 2
277
+ I
278
+ 0
279
+ I
280
+ 0
281
+ I
282
+ 0
283
+ n
284
+ p
285
+ 4
286
+ x
287
+ 7
288
+ Hamster
289
+ n
290
+ x
291
+ 9
292
+ Immutable
293
+ x
294
+ 7
295
+ include
296
+ p
297
+ 3
298
+ I
299
+ 2
300
+ I
301
+ c
302
+ I
303
+ d
304
+ x
305
+ 78
306
+ /Users/haruki_zaemon/Projects/hamster/spec/hamster/immutable/immutable_spec.rb
307
+ p
308
+ 0
309
+ x
310
+ 13
311
+ attach_method
312
+ M
313
+ 1
314
+ p
315
+ 2
316
+ x
317
+ 9
318
+ for_block
319
+ t
320
+ n
321
+ x
322
+ 9
323
+ __block__
324
+ i
325
+ 24
326
+ 45
327
+ 0
328
+ 1
329
+ 13
330
+ 71
331
+ 2
332
+ 47
333
+ 9
334
+ 19
335
+ 47
336
+ 48
337
+ 3
338
+ 13
339
+ 47
340
+ 48
341
+ 4
342
+ 15
343
+ 8
344
+ 21
345
+ 48
346
+ 2
347
+ 38
348
+ 5
349
+ 11
350
+ I
351
+ 3
352
+ I
353
+ 0
354
+ I
355
+ 0
356
+ I
357
+ 0
358
+ I
359
+ -2
360
+ p
361
+ 6
362
+ x
363
+ 7
364
+ Fixture
365
+ n
366
+ x
367
+ 3
368
+ new
369
+ x
370
+ 8
371
+ allocate
372
+ x
373
+ 10
374
+ initialize
375
+ x
376
+ 8
377
+ @fixture
378
+ p
379
+ 5
380
+ I
381
+ 0
382
+ I
383
+ f
384
+ I
385
+ 0
386
+ I
387
+ 10
388
+ I
389
+ 18
390
+ x
391
+ 78
392
+ /Users/haruki_zaemon/Projects/hamster/spec/hamster/immutable/immutable_spec.rb
393
+ p
394
+ 0
395
+ x
396
+ 6
397
+ before
398
+ s
399
+ 12
400
+ returns true
401
+ M
402
+ 1
403
+ p
404
+ 2
405
+ x
406
+ 9
407
+ for_block
408
+ t
409
+ n
410
+ x
411
+ 9
412
+ __block__
413
+ i
414
+ 10
415
+ 39
416
+ 0
417
+ 5
418
+ 47
419
+ 48
420
+ 1
421
+ 49
422
+ 2
423
+ 1
424
+ 11
425
+ I
426
+ 3
427
+ I
428
+ 0
429
+ I
430
+ 0
431
+ I
432
+ 0
433
+ I
434
+ -2
435
+ p
436
+ 3
437
+ x
438
+ 8
439
+ @fixture
440
+ x
441
+ 12
442
+ be_immutable
443
+ x
444
+ 6
445
+ should
446
+ p
447
+ 5
448
+ I
449
+ 0
450
+ I
451
+ 13
452
+ I
453
+ 0
454
+ I
455
+ 14
456
+ I
457
+ a
458
+ x
459
+ 78
460
+ /Users/haruki_zaemon/Projects/hamster/spec/hamster/immutable/immutable_spec.rb
461
+ p
462
+ 0
463
+ x
464
+ 2
465
+ it
466
+ p
467
+ 9
468
+ I
469
+ 0
470
+ I
471
+ 9
472
+ I
473
+ 0
474
+ I
475
+ b
476
+ I
477
+ 1e
478
+ I
479
+ f
480
+ I
481
+ 26
482
+ I
483
+ 13
484
+ I
485
+ 31
486
+ x
487
+ 78
488
+ /Users/haruki_zaemon/Projects/hamster/spec/hamster/immutable/immutable_spec.rb
489
+ p
490
+ 0
491
+ x
492
+ 8
493
+ describe
494
+ s
495
+ 53
496
+ object constructed before its class becomes Immutable
497
+ M
498
+ 1
499
+ p
500
+ 2
501
+ x
502
+ 9
503
+ for_block
504
+ t
505
+ n
506
+ x
507
+ 9
508
+ __block__
509
+ i
510
+ 30
511
+ 5
512
+ 56
513
+ 0
514
+ 47
515
+ 50
516
+ 1
517
+ 0
518
+ 15
519
+ 5
520
+ 7
521
+ 2
522
+ 64
523
+ 56
524
+ 3
525
+ 47
526
+ 50
527
+ 4
528
+ 1
529
+ 15
530
+ 5
531
+ 7
532
+ 5
533
+ 64
534
+ 56
535
+ 6
536
+ 47
537
+ 50
538
+ 4
539
+ 1
540
+ 11
541
+ I
542
+ 4
543
+ I
544
+ 0
545
+ I
546
+ 0
547
+ I
548
+ 0
549
+ I
550
+ -2
551
+ p
552
+ 7
553
+ M
554
+ 1
555
+ p
556
+ 2
557
+ x
558
+ 9
559
+ for_block
560
+ t
561
+ n
562
+ x
563
+ 9
564
+ __block__
565
+ i
566
+ 52
567
+ 45
568
+ 0
569
+ 1
570
+ 13
571
+ 71
572
+ 2
573
+ 47
574
+ 9
575
+ 19
576
+ 47
577
+ 48
578
+ 3
579
+ 13
580
+ 47
581
+ 48
582
+ 4
583
+ 15
584
+ 8
585
+ 21
586
+ 48
587
+ 2
588
+ 13
589
+ 71
590
+ 2
591
+ 47
592
+ 9
593
+ 37
594
+ 47
595
+ 48
596
+ 3
597
+ 13
598
+ 47
599
+ 48
600
+ 4
601
+ 15
602
+ 8
603
+ 39
604
+ 48
605
+ 2
606
+ 38
607
+ 5
608
+ 15
609
+ 39
610
+ 5
611
+ 48
612
+ 6
613
+ 56
614
+ 7
615
+ 50
616
+ 8
617
+ 0
618
+ 11
619
+ I
620
+ 3
621
+ I
622
+ 0
623
+ I
624
+ 0
625
+ I
626
+ 0
627
+ I
628
+ -2
629
+ p
630
+ 9
631
+ x
632
+ 5
633
+ Class
634
+ n
635
+ x
636
+ 3
637
+ new
638
+ x
639
+ 8
640
+ allocate
641
+ x
642
+ 10
643
+ initialize
644
+ x
645
+ 8
646
+ @fixture
647
+ x
648
+ 5
649
+ class
650
+ M
651
+ 1
652
+ p
653
+ 2
654
+ x
655
+ 9
656
+ for_block
657
+ t
658
+ n
659
+ x
660
+ 9
661
+ __block__
662
+ i
663
+ 11
664
+ 5
665
+ 45
666
+ 0
667
+ 1
668
+ 43
669
+ 2
670
+ 47
671
+ 49
672
+ 3
673
+ 1
674
+ 11
675
+ I
676
+ 3
677
+ I
678
+ 0
679
+ I
680
+ 0
681
+ I
682
+ 0
683
+ I
684
+ -2
685
+ p
686
+ 4
687
+ x
688
+ 7
689
+ Hamster
690
+ n
691
+ x
692
+ 9
693
+ Immutable
694
+ x
695
+ 7
696
+ include
697
+ p
698
+ 5
699
+ I
700
+ 0
701
+ I
702
+ 1d
703
+ I
704
+ 0
705
+ I
706
+ 1e
707
+ I
708
+ b
709
+ x
710
+ 78
711
+ /Users/haruki_zaemon/Projects/hamster/spec/hamster/immutable/immutable_spec.rb
712
+ p
713
+ 0
714
+ x
715
+ 13
716
+ instance_eval
717
+ p
718
+ 7
719
+ I
720
+ 0
721
+ I
722
+ 1b
723
+ I
724
+ 0
725
+ I
726
+ 1c
727
+ I
728
+ 2a
729
+ I
730
+ 1d
731
+ I
732
+ 34
733
+ x
734
+ 78
735
+ /Users/haruki_zaemon/Projects/hamster/spec/hamster/immutable/immutable_spec.rb
736
+ p
737
+ 0
738
+ x
739
+ 6
740
+ before
741
+ s
742
+ 19
743
+ that are not frozen
744
+ M
745
+ 1
746
+ p
747
+ 2
748
+ x
749
+ 9
750
+ for_block
751
+ t
752
+ n
753
+ x
754
+ 9
755
+ __block__
756
+ i
757
+ 11
758
+ 5
759
+ 7
760
+ 0
761
+ 64
762
+ 56
763
+ 1
764
+ 47
765
+ 50
766
+ 2
767
+ 1
768
+ 11
769
+ I
770
+ 4
771
+ I
772
+ 0
773
+ I
774
+ 0
775
+ I
776
+ 0
777
+ I
778
+ -2
779
+ p
780
+ 3
781
+ s
782
+ 13
783
+ returns false
784
+ M
785
+ 1
786
+ p
787
+ 2
788
+ x
789
+ 9
790
+ for_block
791
+ t
792
+ n
793
+ x
794
+ 9
795
+ __block__
796
+ i
797
+ 10
798
+ 39
799
+ 0
800
+ 5
801
+ 47
802
+ 48
803
+ 1
804
+ 49
805
+ 2
806
+ 1
807
+ 11
808
+ I
809
+ 3
810
+ I
811
+ 0
812
+ I
813
+ 0
814
+ I
815
+ 0
816
+ I
817
+ -2
818
+ p
819
+ 3
820
+ x
821
+ 8
822
+ @fixture
823
+ x
824
+ 12
825
+ be_immutable
826
+ x
827
+ 10
828
+ should_not
829
+ p
830
+ 5
831
+ I
832
+ 0
833
+ I
834
+ 24
835
+ I
836
+ 0
837
+ I
838
+ 25
839
+ I
840
+ a
841
+ x
842
+ 78
843
+ /Users/haruki_zaemon/Projects/hamster/spec/hamster/immutable/immutable_spec.rb
844
+ p
845
+ 0
846
+ x
847
+ 2
848
+ it
849
+ p
850
+ 5
851
+ I
852
+ 0
853
+ I
854
+ 22
855
+ I
856
+ 0
857
+ I
858
+ 24
859
+ I
860
+ b
861
+ x
862
+ 78
863
+ /Users/haruki_zaemon/Projects/hamster/spec/hamster/immutable/immutable_spec.rb
864
+ p
865
+ 0
866
+ x
867
+ 8
868
+ describe
869
+ s
870
+ 15
871
+ that are frozen
872
+ M
873
+ 1
874
+ p
875
+ 2
876
+ x
877
+ 9
878
+ for_block
879
+ t
880
+ n
881
+ x
882
+ 9
883
+ __block__
884
+ i
885
+ 19
886
+ 5
887
+ 56
888
+ 0
889
+ 47
890
+ 50
891
+ 1
892
+ 0
893
+ 15
894
+ 5
895
+ 7
896
+ 2
897
+ 64
898
+ 56
899
+ 3
900
+ 47
901
+ 50
902
+ 4
903
+ 1
904
+ 11
905
+ I
906
+ 4
907
+ I
908
+ 0
909
+ I
910
+ 0
911
+ I
912
+ 0
913
+ I
914
+ -2
915
+ p
916
+ 5
917
+ M
918
+ 1
919
+ p
920
+ 2
921
+ x
922
+ 9
923
+ for_block
924
+ t
925
+ n
926
+ x
927
+ 9
928
+ __block__
929
+ i
930
+ 5
931
+ 39
932
+ 0
933
+ 48
934
+ 1
935
+ 11
936
+ I
937
+ 2
938
+ I
939
+ 0
940
+ I
941
+ 0
942
+ I
943
+ 0
944
+ I
945
+ -2
946
+ p
947
+ 2
948
+ x
949
+ 8
950
+ @fixture
951
+ x
952
+ 6
953
+ freeze
954
+ p
955
+ 5
956
+ I
957
+ 0
958
+ I
959
+ 2c
960
+ I
961
+ 0
962
+ I
963
+ 2d
964
+ I
965
+ 5
966
+ x
967
+ 78
968
+ /Users/haruki_zaemon/Projects/hamster/spec/hamster/immutable/immutable_spec.rb
969
+ p
970
+ 0
971
+ x
972
+ 6
973
+ before
974
+ s
975
+ 12
976
+ returns true
977
+ M
978
+ 1
979
+ p
980
+ 2
981
+ x
982
+ 9
983
+ for_block
984
+ t
985
+ n
986
+ x
987
+ 9
988
+ __block__
989
+ i
990
+ 10
991
+ 39
992
+ 0
993
+ 5
994
+ 47
995
+ 48
996
+ 1
997
+ 49
998
+ 2
999
+ 1
1000
+ 11
1001
+ I
1002
+ 3
1003
+ I
1004
+ 0
1005
+ I
1006
+ 0
1007
+ I
1008
+ 0
1009
+ I
1010
+ -2
1011
+ p
1012
+ 3
1013
+ x
1014
+ 8
1015
+ @fixture
1016
+ x
1017
+ 12
1018
+ be_immutable
1019
+ x
1020
+ 6
1021
+ should
1022
+ p
1023
+ 5
1024
+ I
1025
+ 0
1026
+ I
1027
+ 30
1028
+ I
1029
+ 0
1030
+ I
1031
+ 31
1032
+ I
1033
+ a
1034
+ x
1035
+ 78
1036
+ /Users/haruki_zaemon/Projects/hamster/spec/hamster/immutable/immutable_spec.rb
1037
+ p
1038
+ 0
1039
+ x
1040
+ 2
1041
+ it
1042
+ p
1043
+ 7
1044
+ I
1045
+ 0
1046
+ I
1047
+ 2a
1048
+ I
1049
+ 0
1050
+ I
1051
+ 2c
1052
+ I
1053
+ 8
1054
+ I
1055
+ 30
1056
+ I
1057
+ 13
1058
+ x
1059
+ 78
1060
+ /Users/haruki_zaemon/Projects/hamster/spec/hamster/immutable/immutable_spec.rb
1061
+ p
1062
+ 0
1063
+ p
1064
+ 9
1065
+ I
1066
+ 0
1067
+ I
1068
+ 19
1069
+ I
1070
+ 0
1071
+ I
1072
+ 1b
1073
+ I
1074
+ 8
1075
+ I
1076
+ 22
1077
+ I
1078
+ 13
1079
+ I
1080
+ 2a
1081
+ I
1082
+ 1e
1083
+ x
1084
+ 78
1085
+ /Users/haruki_zaemon/Projects/hamster/spec/hamster/immutable/immutable_spec.rb
1086
+ p
1087
+ 0
1088
+ p
1089
+ 7
1090
+ I
1091
+ 0
1092
+ I
1093
+ 7
1094
+ I
1095
+ 0
1096
+ I
1097
+ 9
1098
+ I
1099
+ b
1100
+ I
1101
+ 19
1102
+ I
1103
+ 16
1104
+ x
1105
+ 78
1106
+ /Users/haruki_zaemon/Projects/hamster/spec/hamster/immutable/immutable_spec.rb
1107
+ p
1108
+ 0
1109
+ x
1110
+ 8
1111
+ describe
1112
+ p
1113
+ 5
1114
+ I
1115
+ 0
1116
+ I
1117
+ 5
1118
+ I
1119
+ 0
1120
+ I
1121
+ 7
1122
+ I
1123
+ b
1124
+ x
1125
+ 78
1126
+ /Users/haruki_zaemon/Projects/hamster/spec/hamster/immutable/immutable_spec.rb
1127
+ p
1128
+ 0
1129
+ x
1130
+ 8
1131
+ describe
1132
+ p
1133
+ 7
1134
+ I
1135
+ 0
1136
+ I
1137
+ 1
1138
+ I
1139
+ 9
1140
+ I
1141
+ 3
1142
+ I
1143
+ 12
1144
+ I
1145
+ 5
1146
+ I
1147
+ 21
1148
+ x
1149
+ 78
1150
+ /Users/haruki_zaemon/Projects/hamster/spec/hamster/immutable/immutable_spec.rb
1151
+ p
1152
+ 0