facets 2.4.5 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (763) hide show
  1. data/AUTHORS +6 -2
  2. data/CHANGES +46 -52
  3. data/MANIFEST +680 -642
  4. data/README +3 -10
  5. data/RELEASE +82 -36
  6. data/VERSION +1 -1
  7. data/doc/archive/{changelog-0.rdoc → CHANGELOG-0.10.30} +0 -0
  8. data/doc/archive/{changelog-1.rdoc → CHANGELOG-1.8.54} +0 -0
  9. data/doc/archive/CHANGELOG-2.4.5 +1654 -0
  10. data/doc/{news → archive}/RELEASE-2.0.5 +0 -0
  11. data/doc/{news → archive}/RELEASE-2.1.0 +0 -0
  12. data/doc/{news → archive}/RELEASE-2.1.1 +0 -0
  13. data/doc/{news → archive}/RELEASE-2.1.2 +0 -0
  14. data/doc/{news → archive}/RELEASE-2.1.3 +0 -0
  15. data/doc/{news → archive}/RELEASE-2.2.0 +0 -0
  16. data/doc/{news → archive}/RELEASE-2.2.1 +0 -0
  17. data/doc/{news → archive}/RELEASE-2.3.0 +0 -0
  18. data/doc/{news → archive}/RELEASE-2.4.0 +0 -0
  19. data/doc/{news → archive}/RELEASE-2.4.1 +0 -0
  20. data/doc/{news → archive}/RELEASE-2.4.2 +0 -0
  21. data/doc/{news → archive}/RELEASE-2.4.3 +0 -0
  22. data/doc/{news → archive}/RELEASE-2.4.4 +0 -0
  23. data/doc/archive/RELEASE-2.4.5 +37 -0
  24. data/doc/{book/history.rdoc → guide/notes.rd} +62 -4
  25. data/doc/log/basic_stats/index.html +39 -0
  26. data/doc/log/bstats/stats.html +39 -0
  27. data/doc/log/changelog.html +141 -0
  28. data/doc/log/changelog.txt +1609 -0
  29. data/doc/log/stats.html +25 -0
  30. data/doc/log/testlog.txt +278 -0
  31. data/doc/rdoc/core/classes/Array.html +158 -147
  32. data/doc/rdoc/core/classes/Binding.html +54 -54
  33. data/doc/rdoc/core/classes/Class.html +59 -57
  34. data/doc/rdoc/core/classes/Comparable.html +67 -76
  35. data/doc/rdoc/core/classes/Dir.html +47 -47
  36. data/doc/rdoc/core/classes/Enumerable.html +232 -192
  37. data/doc/rdoc/core/classes/Exception.html +15 -16
  38. data/doc/rdoc/core/classes/File.html +128 -85
  39. data/doc/rdoc/core/classes/FileTest.html +7 -7
  40. data/doc/rdoc/core/classes/Float.html +16 -14
  41. data/doc/rdoc/core/classes/Functor.html +12 -12
  42. data/doc/rdoc/core/classes/Hash.html +490 -319
  43. data/doc/rdoc/core/classes/Indexable.html +110 -110
  44. data/doc/rdoc/core/classes/InstanceVariables.html +44 -44
  45. data/doc/rdoc/core/classes/Integer.html +122 -116
  46. data/doc/rdoc/core/classes/Kernel.html +415 -401
  47. data/doc/rdoc/core/classes/Lazy/Promise.html +1 -1
  48. data/doc/rdoc/core/classes/MatchData.html +24 -21
  49. data/doc/rdoc/core/classes/Module.html +230 -229
  50. data/doc/rdoc/core/classes/NilClass.html +28 -26
  51. data/doc/rdoc/core/classes/Numeric.html +30 -30
  52. data/doc/rdoc/core/classes/Object.html +8 -8
  53. data/doc/rdoc/core/classes/{Friend.html → ObjectSpace.html} +25 -48
  54. data/doc/rdoc/core/classes/Proc.html +29 -27
  55. data/doc/rdoc/core/classes/Range.html +17 -15
  56. data/doc/rdoc/core/classes/Regexp.html +17 -17
  57. data/doc/rdoc/core/classes/Stackable.html +31 -31
  58. data/doc/rdoc/core/classes/String.html +445 -401
  59. data/doc/rdoc/{more/classes/CLI/NoOptionError.html → core/classes/Struct.html} +24 -21
  60. data/doc/rdoc/core/classes/Symbol.html +73 -65
  61. data/doc/rdoc/core/classes/Time.html +87 -86
  62. data/doc/rdoc/core/classes/TrueClass.html +8 -8
  63. data/doc/rdoc/core/classes/UnboundMethod.html +17 -16
  64. data/doc/rdoc/core/created.rid +1 -1
  65. data/doc/rdoc/core/files/README.html +10 -16
  66. data/doc/rdoc/core/files/lib/core/facets/array/combination_rb.html +1 -1
  67. data/doc/rdoc/core/files/lib/core/facets/array/conjoin_rb.html +1 -1
  68. data/doc/rdoc/core/files/lib/core/facets/array/delete_rb.html +10 -1
  69. data/doc/rdoc/core/files/lib/core/facets/array/delete_unless_rb.html +92 -0
  70. data/doc/rdoc/core/files/lib/core/facets/array/delete_values_rb.html +92 -0
  71. data/doc/rdoc/core/files/lib/core/facets/array/index_rb.html +1 -1
  72. data/doc/rdoc/core/files/lib/core/facets/array/indexable_rb.html +1 -1
  73. data/doc/rdoc/core/files/lib/core/facets/array/merge_rb.html +1 -1
  74. data/doc/rdoc/core/files/lib/core/facets/array/only_rb.html +1 -1
  75. data/doc/rdoc/core/files/lib/core/facets/array/pad_rb.html +1 -1
  76. data/doc/rdoc/core/files/lib/core/facets/array/permutation_rb.html +1 -1
  77. data/doc/rdoc/core/files/lib/core/facets/array/product_rb.html +1 -1
  78. data/doc/rdoc/core/files/lib/core/facets/array/rotate_rb.html +1 -1
  79. data/doc/rdoc/core/files/lib/core/facets/array/select_rb.html +1 -1
  80. data/doc/rdoc/core/files/lib/core/facets/array/splice_rb.html +1 -1
  81. data/doc/rdoc/core/files/lib/core/facets/array/stackable_rb.html +1 -1
  82. data/doc/rdoc/core/files/lib/core/facets/binding/caller_rb.html +2 -2
  83. data/doc/rdoc/core/files/lib/core/facets/binding/callstack_rb.html +96 -0
  84. data/doc/rdoc/core/files/lib/core/facets/binding/defined_rb.html +1 -1
  85. data/doc/rdoc/core/files/lib/core/facets/bitmask_rb.html +1 -1
  86. data/doc/rdoc/core/files/lib/core/facets/class/cattr_rb.html +1 -1
  87. data/doc/rdoc/core/files/lib/core/facets/class/descendents_rb.html +1 -1
  88. data/doc/rdoc/core/files/lib/core/facets/class/prepend_rb.html +1 -1
  89. data/doc/rdoc/core/files/lib/core/facets/class/to_proc_rb.html +1 -1
  90. data/doc/rdoc/core/files/lib/core/facets/comparable/at_least_rb.html +96 -0
  91. data/doc/rdoc/core/files/lib/core/facets/comparable/at_most_rb.html +96 -0
  92. data/doc/rdoc/core/files/lib/core/facets/comparable/bound_rb.html +5 -1
  93. data/doc/rdoc/core/files/lib/core/facets/comparable/cap_rb.html +92 -0
  94. data/doc/rdoc/core/files/lib/core/facets/comparable/clip_rb.html +92 -0
  95. data/doc/rdoc/core/files/lib/core/facets/comparable/cmp_rb.html +1 -1
  96. data/doc/rdoc/core/files/lib/core/facets/comparable/comparable_rb.html +1 -1
  97. data/doc/rdoc/core/files/lib/core/facets/dir/ascend_rb.html +1 -1
  98. data/doc/rdoc/core/files/lib/core/facets/dir/multiglob_rb.html +1 -1
  99. data/doc/rdoc/core/files/lib/core/facets/dir/recurse_rb.html +1 -1
  100. data/doc/rdoc/core/files/lib/core/facets/enumerable/accumulate_rb.html +1 -1
  101. data/doc/rdoc/core/files/lib/core/facets/enumerable/cluster_by_rb.html +1 -1
  102. data/doc/rdoc/core/files/lib/core/facets/enumerable/collect_rb.html +1 -1
  103. data/doc/rdoc/core/files/lib/core/facets/enumerable/commonality_rb.html +1 -1
  104. data/doc/rdoc/core/files/lib/core/facets/enumerable/count_rb.html +1 -1
  105. data/doc/rdoc/core/files/lib/core/facets/enumerable/divide_rb.html +1 -1
  106. data/doc/rdoc/core/files/lib/core/facets/enumerable/duplicates_rb.html +1 -1
  107. data/doc/rdoc/core/files/lib/core/facets/enumerable/each_by_rb.html +1 -1
  108. data/doc/rdoc/core/files/lib/core/facets/enumerable/entropy_rb.html +1 -1
  109. data/doc/rdoc/core/files/lib/core/facets/enumerable/frequency_rb.html +1 -1
  110. data/doc/rdoc/core/files/lib/core/facets/enumerable/graph_rb.html +96 -0
  111. data/doc/rdoc/core/files/lib/core/facets/enumerable/group_by_rb.html +1 -1
  112. data/doc/rdoc/core/files/lib/core/facets/enumerable/inject_rb.html +1 -1
  113. data/doc/rdoc/core/files/lib/core/facets/enumerable/map_send_rb.html +1 -1
  114. data/doc/rdoc/core/files/lib/core/facets/enumerable/mash_rb.html +1 -1
  115. data/doc/rdoc/core/files/lib/core/facets/enumerable/mode_rb.html +1 -1
  116. data/doc/rdoc/core/files/lib/core/facets/enumerable/modulate_rb.html +1 -1
  117. data/doc/rdoc/core/files/lib/core/facets/enumerable/none_rb.html +1 -1
  118. data/doc/rdoc/core/files/lib/core/facets/enumerable/occur_rb.html +1 -1
  119. data/doc/rdoc/core/files/lib/core/facets/enumerable/one_rb.html +1 -1
  120. data/doc/rdoc/core/files/lib/core/facets/enumerable/probability_rb.html +1 -1
  121. data/doc/rdoc/core/files/lib/core/facets/enumerable/sum_rb.html +1 -1
  122. data/doc/rdoc/core/files/lib/core/facets/enumerable/take_rb.html +92 -0
  123. data/doc/rdoc/core/files/lib/core/facets/enumerable/uniq_by_rb.html +1 -1
  124. data/doc/rdoc/core/files/lib/core/facets/exception/detail_rb.html +1 -1
  125. data/doc/rdoc/core/files/lib/core/facets/exception/suppress_rb.html +1 -1
  126. data/doc/rdoc/core/files/lib/core/facets/file/append_rb.html +1 -1
  127. data/doc/rdoc/core/files/lib/core/facets/file/create_rb.html +1 -1
  128. data/doc/rdoc/core/files/lib/core/facets/file/null_rb.html +1 -1
  129. data/doc/rdoc/core/files/lib/core/facets/file/read_rb.html +1 -1
  130. data/doc/rdoc/core/files/lib/core/facets/file/rewrite_rb.html +1 -1
  131. data/doc/rdoc/core/files/lib/core/facets/file/rootname_rb.html +1 -1
  132. data/doc/rdoc/core/files/lib/core/facets/file/split_all_rb.html +92 -0
  133. data/doc/rdoc/core/files/lib/core/facets/file/split_root_rb.html +1 -1
  134. data/doc/rdoc/core/files/lib/core/facets/file/write_rb.html +1 -1
  135. data/doc/rdoc/core/files/lib/core/facets/file/writelines_rb.html +1 -1
  136. data/doc/rdoc/core/files/lib/core/facets/filetest/root_rb.html +1 -1
  137. data/doc/rdoc/core/files/lib/core/facets/hash/alias_rb.html +1 -1
  138. data/doc/rdoc/core/files/lib/core/facets/hash/autonew_rb.html +1 -1
  139. data/doc/rdoc/core/files/lib/core/facets/hash/collate_rb.html +1 -1
  140. data/doc/rdoc/core/files/lib/core/facets/hash/delete_rb.html +1 -1
  141. data/doc/rdoc/core/files/lib/core/facets/hash/insert_rb.html +1 -1
  142. data/doc/rdoc/core/files/lib/core/facets/hash/inverse_rb.html +1 -1
  143. data/doc/rdoc/core/files/lib/core/facets/hash/join_rb.html +1 -1
  144. data/doc/rdoc/core/files/lib/core/facets/hash/keys_rb.html +1 -1
  145. data/doc/rdoc/core/files/lib/core/facets/hash/op_add_rb.html +1 -1
  146. data/doc/rdoc/core/files/lib/core/facets/hash/op_and_rb.html +1 -1
  147. data/doc/rdoc/core/files/lib/core/facets/hash/op_mul_rb.html +1 -1
  148. data/doc/rdoc/core/files/lib/core/facets/hash/op_or_rb.html +1 -1
  149. data/doc/rdoc/core/files/lib/core/facets/hash/op_push_rb.html +1 -1
  150. data/doc/rdoc/core/files/lib/core/facets/hash/op_sub_rb.html +1 -1
  151. data/doc/rdoc/core/files/lib/core/facets/hash/rekey_rb.html +1 -1
  152. data/doc/rdoc/core/files/lib/core/facets/hash/replace_each_rb.html +92 -0
  153. data/doc/rdoc/core/files/lib/core/facets/hash/select_rb.html +1 -1
  154. data/doc/rdoc/{more/files/lib/more → core/files/lib/core}/facets/hash/stringify_keys_rb.html +1 -1
  155. data/doc/rdoc/{more/files/lib/more → core/files/lib/core}/facets/hash/symbolize_keys_rb.html +2 -2
  156. data/doc/rdoc/core/files/lib/core/facets/hash/to_options_rb.html +96 -0
  157. data/doc/rdoc/core/files/lib/core/facets/hash/to_struct_rb.html +1 -1
  158. data/doc/rdoc/core/files/lib/core/facets/hash/traverse_rb.html +1 -1
  159. data/doc/rdoc/core/files/lib/core/facets/hash/update_each_rb.html +92 -0
  160. data/doc/rdoc/core/files/lib/core/facets/hash/update_keys_rb.html +92 -0
  161. data/doc/rdoc/core/files/lib/core/facets/hash/update_rb.html +8 -1
  162. data/doc/rdoc/core/files/lib/core/facets/hash/update_values_rb.html +92 -0
  163. data/doc/rdoc/core/files/lib/core/facets/hash/weave_rb.html +1 -1
  164. data/doc/rdoc/core/files/lib/core/facets/hash/zipnew_rb.html +1 -5
  165. data/doc/rdoc/core/files/lib/core/facets/integer/factorial_rb.html +1 -1
  166. data/doc/rdoc/core/files/lib/core/facets/integer/multiple_rb.html +1 -1
  167. data/doc/rdoc/core/files/lib/core/facets/integer/odd_rb.html +1 -1
  168. data/doc/rdoc/core/files/lib/core/facets/kernel/__here___rb.html +92 -0
  169. data/doc/rdoc/core/files/lib/core/facets/kernel/as_rb.html +1 -1
  170. data/doc/rdoc/core/files/lib/core/facets/kernel/ask_rb.html +1 -1
  171. data/doc/rdoc/core/files/lib/core/facets/kernel/attr_singleton_rb.html +1 -1
  172. data/doc/rdoc/core/files/lib/core/facets/kernel/callstack_rb.html +92 -0
  173. data/doc/rdoc/core/files/lib/core/facets/kernel/complete_rb.html +1 -1
  174. data/doc/rdoc/core/files/lib/core/facets/kernel/constant_rb.html +1 -1
  175. data/doc/rdoc/core/files/lib/core/facets/kernel/d_rb.html +1 -1
  176. data/doc/rdoc/core/files/lib/core/facets/kernel/demo_rb.html +1 -1
  177. data/doc/rdoc/core/files/lib/core/facets/kernel/ergo_rb.html +1 -1
  178. data/doc/rdoc/core/files/lib/core/facets/kernel/instance_class_rb.html +1 -1
  179. data/doc/rdoc/core/files/lib/core/facets/kernel/instance_variables_rb.html +1 -1
  180. data/doc/rdoc/core/files/lib/core/facets/kernel/not_nil_rb.html +1 -1
  181. data/doc/rdoc/core/files/lib/core/facets/kernel/object_send_rb.html +1 -1
  182. data/doc/rdoc/core/files/lib/core/facets/kernel/p_rb.html +1 -1
  183. data/doc/rdoc/core/files/lib/core/facets/kernel/populate_rb.html +1 -1
  184. data/doc/rdoc/core/files/lib/core/facets/kernel/qua_class_rb.html +1 -1
  185. data/doc/rdoc/core/files/lib/core/facets/kernel/resc_rb.html +1 -1
  186. data/doc/rdoc/core/files/lib/core/facets/kernel/respond_rb.html +1 -1
  187. data/doc/rdoc/core/files/lib/core/facets/kernel/returning_rb.html +1 -1
  188. data/doc/rdoc/core/files/lib/core/facets/kernel/silence_rb.html +1 -1
  189. data/doc/rdoc/core/files/lib/core/facets/kernel/try_rb.html +1 -1
  190. data/doc/rdoc/core/files/lib/core/facets/matchdata/match_rb.html +1 -1
  191. data/doc/rdoc/core/files/lib/core/facets/matchdata/matchset_rb.html +1 -1
  192. data/doc/rdoc/core/files/lib/core/facets/metaid_rb.html +1 -1
  193. data/doc/rdoc/core/files/lib/core/facets/module/abstract_rb.html +1 -1
  194. data/doc/rdoc/core/files/lib/core/facets/module/alias_accessor_rb.html +1 -1
  195. data/doc/rdoc/core/files/lib/core/facets/module/alias_method_chain_rb.html +1 -1
  196. data/doc/rdoc/core/files/lib/core/facets/module/alias_module_function_rb.html +1 -1
  197. data/doc/rdoc/core/files/lib/core/facets/module/ancestor_rb.html +1 -1
  198. data/doc/rdoc/core/files/lib/core/facets/module/basename_rb.html +1 -1
  199. data/doc/rdoc/core/files/lib/core/facets/module/conflict_rb.html +1 -1
  200. data/doc/rdoc/core/files/lib/core/facets/module/include_function_module_rb.html +1 -1
  201. data/doc/rdoc/core/files/lib/core/facets/module/instance_methods_rb.html +1 -1
  202. data/doc/rdoc/core/files/lib/core/facets/module/is_rb.html +1 -1
  203. data/doc/rdoc/core/files/lib/core/facets/module/methodize_rb.html +1 -1
  204. data/doc/rdoc/core/files/lib/core/facets/module/modspace_rb.html +1 -1
  205. data/doc/rdoc/core/files/lib/core/facets/module/module_load_rb.html +1 -1
  206. data/doc/rdoc/core/files/lib/core/facets/module/nesting_rb.html +1 -1
  207. data/doc/rdoc/core/files/lib/core/facets/module/op_rb.html +1 -1
  208. data/doc/rdoc/core/files/lib/core/facets/module/prepend_rb.html +1 -1
  209. data/doc/rdoc/core/files/lib/core/facets/module/redefine_method_rb.html +1 -1
  210. data/doc/rdoc/core/files/lib/core/facets/module/rename_method_rb.html +1 -1
  211. data/doc/rdoc/core/files/lib/core/facets/module/revise_rb.html +1 -1
  212. data/doc/rdoc/core/files/lib/core/facets/module/spacename_rb.html +1 -1
  213. data/doc/rdoc/core/files/lib/core/facets/module/wrap_method_rb.html +1 -1
  214. data/doc/rdoc/core/files/lib/core/facets/nilclass/to_f_rb.html +1 -1
  215. data/doc/rdoc/core/files/lib/core/facets/numeric/approx_rb.html +1 -1
  216. data/doc/rdoc/core/files/lib/core/facets/numeric/distance_rb.html +1 -1
  217. data/doc/rdoc/core/files/lib/core/facets/numeric/round_rb.html +1 -1
  218. data/doc/rdoc/core/files/lib/core/facets/objectspace/classes_rb.html +92 -0
  219. data/doc/rdoc/{more/files/lib/more/facets/dictionarymatcher_rb.html → core/files/lib/core/facets/objectspace_rb.html} +4 -4
  220. data/doc/rdoc/core/files/lib/core/facets/proc/bind_rb.html +1 -1
  221. data/doc/rdoc/core/files/lib/core/facets/proc/compose_rb.html +1 -1
  222. data/doc/rdoc/core/files/lib/core/facets/proc/to_method_rb.html +1 -1
  223. data/doc/rdoc/core/files/lib/core/facets/proc/update_rb.html +1 -1
  224. data/doc/rdoc/core/files/lib/core/facets/range/combine_rb.html +1 -1
  225. data/doc/rdoc/core/files/lib/core/facets/range/overlap_rb.html +1 -1
  226. data/doc/rdoc/core/files/lib/core/facets/range/within_rb.html +1 -1
  227. data/doc/rdoc/core/files/lib/core/facets/regexp/arity_rb.html +1 -1
  228. data/doc/rdoc/core/files/lib/core/facets/string/align_rb.html +1 -1
  229. data/doc/rdoc/core/files/lib/core/facets/string/bracket_rb.html +1 -1
  230. data/doc/rdoc/core/files/lib/core/facets/string/camelcase_rb.html +1 -1
  231. data/doc/rdoc/core/files/lib/core/facets/string/capitalized_rb.html +1 -1
  232. data/doc/rdoc/core/files/lib/core/facets/string/chars_rb.html +1 -1
  233. data/doc/rdoc/core/files/lib/core/facets/string/chomp_rb.html +1 -1
  234. data/doc/rdoc/core/files/lib/core/facets/string/cleave_rb.html +1 -1
  235. data/doc/rdoc/core/files/lib/core/facets/string/compress_lines_rb.html +92 -0
  236. data/doc/rdoc/core/files/lib/core/facets/string/contains_rb.html +92 -0
  237. data/doc/rdoc/core/files/lib/core/facets/string/divide_rb.html +1 -1
  238. data/doc/rdoc/core/files/lib/core/facets/string/expand_tab_rb.html +92 -0
  239. data/doc/rdoc/core/files/lib/core/facets/string/fold_rb.html +1 -1
  240. data/doc/rdoc/core/files/lib/core/facets/string/indent_rb.html +92 -0
  241. data/doc/rdoc/core/files/lib/core/facets/string/interpolate_rb.html +1 -1
  242. data/doc/rdoc/core/files/lib/core/facets/string/line_wrap_rb.html +1 -1
  243. data/doc/rdoc/core/files/lib/core/facets/string/lines_rb.html +1 -1
  244. data/doc/rdoc/core/files/lib/core/facets/string/margin_rb.html +92 -0
  245. data/doc/rdoc/core/files/lib/core/facets/string/methodize_rb.html +1 -1
  246. data/doc/rdoc/core/files/lib/core/facets/string/mscan_rb.html +1 -1
  247. data/doc/rdoc/core/files/lib/core/facets/string/natcmp_rb.html +1 -1
  248. data/doc/rdoc/core/files/lib/core/facets/string/nchar_rb.html +1 -1
  249. data/doc/rdoc/core/files/lib/core/facets/string/op_sub_rb.html +1 -1
  250. data/doc/rdoc/core/files/lib/core/facets/string/outdent_rb.html +96 -0
  251. data/doc/rdoc/core/files/lib/core/facets/string/range_rb.html +1 -1
  252. data/doc/rdoc/core/files/lib/core/facets/string/rewrite_rb.html +1 -1
  253. data/doc/rdoc/core/files/lib/core/facets/string/shatter_rb.html +1 -1
  254. data/doc/rdoc/core/files/lib/core/facets/string/snakecase_rb.html +1 -1
  255. data/doc/rdoc/core/files/lib/core/facets/string/splice_rb.html +1 -1
  256. data/doc/rdoc/core/files/lib/core/facets/string/start_with_rb.html +1 -1
  257. data/doc/rdoc/core/files/lib/core/facets/string/tab_rb.html +8 -1
  258. data/doc/rdoc/core/files/lib/core/facets/string/tabto_rb.html +96 -0
  259. data/doc/rdoc/core/files/lib/core/facets/string/titlecase_rb.html +1 -1
  260. data/doc/rdoc/core/files/lib/core/facets/string/to_re_rb.html +1 -1
  261. data/doc/rdoc/core/files/lib/core/facets/string/word_wrap_rb.html +1 -1
  262. data/doc/rdoc/core/files/lib/core/facets/struct/attributes_rb.html +92 -0
  263. data/doc/rdoc/{more/files/lib/more/facets/bytes_rb.html → core/files/lib/core/facets/struct_rb.html} +4 -4
  264. data/doc/rdoc/core/files/lib/core/facets/symbol/chomp_rb.html +1 -1
  265. data/doc/rdoc/core/files/lib/core/facets/symbol/generate_rb.html +1 -1
  266. data/doc/rdoc/core/files/lib/core/facets/symbol/not_rb.html +1 -1
  267. data/doc/rdoc/core/files/lib/core/facets/symbol/succ_rb.html +1 -1
  268. data/doc/rdoc/core/files/lib/core/facets/symbol/to_proc_rb.html +1 -1
  269. data/doc/rdoc/core/files/lib/core/facets/time/advance_rb.html +1 -1
  270. data/doc/rdoc/core/files/lib/core/facets/time/change_rb.html +1 -1
  271. data/doc/rdoc/core/files/lib/core/facets/time/elapse_rb.html +1 -1
  272. data/doc/rdoc/core/files/lib/core/facets/time/hence_rb.html +1 -1
  273. data/doc/rdoc/core/files/lib/core/facets/time/stamp_rb.html +1 -1
  274. data/doc/rdoc/core/files/lib/core/facets/to_hash_rb.html +1 -1
  275. data/doc/rdoc/core/files/lib/core/facets/unboundmethod/arguments_rb.html +1 -1
  276. data/doc/rdoc/core/files/lib/core/facets/unboundmethod/name_rb.html +1 -1
  277. data/doc/rdoc/core/fr_class_index.html +2 -1
  278. data/doc/rdoc/core/fr_file_index.html +30 -1
  279. data/doc/rdoc/core/fr_method_index.html +430 -423
  280. data/doc/rdoc/lore/classes/Date.html +6 -5
  281. data/doc/rdoc/{more/classes/CLI/Command/UniversalOptions.html → lore/classes/Enumerable.html} +7 -9
  282. data/doc/rdoc/lore/classes/Enumerable/Enumerator.html +147 -0
  283. data/doc/rdoc/lore/classes/OpenStruct.html +13 -15
  284. data/doc/rdoc/lore/created.rid +1 -1
  285. data/doc/rdoc/lore/files/README.html +10 -16
  286. data/doc/rdoc/lore/files/lib/lore/facets/date_rb.html +1 -1
  287. data/doc/rdoc/lore/files/lib/lore/facets/enumerator_rb.html +111 -0
  288. data/doc/rdoc/lore/files/lib/lore/facets/ostruct_rb.html +1 -1
  289. data/doc/rdoc/lore/fr_class_index.html +2 -0
  290. data/doc/rdoc/lore/fr_file_index.html +1 -0
  291. data/doc/rdoc/lore/fr_method_index.html +13 -12
  292. data/doc/rdoc/more/classes/ANSICode.html +66 -66
  293. data/doc/rdoc/more/classes/Advisable.html +37 -37
  294. data/doc/rdoc/more/classes/Advisable/Method.html +20 -20
  295. data/doc/rdoc/more/classes/Archive/Tar/Minitar.html +27 -27
  296. data/doc/rdoc/more/classes/Archive/Tar/Minitar/Input.html +28 -28
  297. data/doc/rdoc/more/classes/Archive/Tar/Minitar/Output.html +19 -19
  298. data/doc/rdoc/more/classes/Archive/Tar/Minitar/Reader.html +31 -31
  299. data/doc/rdoc/more/classes/Archive/Tar/Minitar/Writer.html +33 -33
  300. data/doc/rdoc/more/classes/Argvector.html +76 -76
  301. data/doc/rdoc/more/classes/Association.html +28 -28
  302. data/doc/rdoc/more/classes/Association/Kernel.html +8 -8
  303. data/doc/rdoc/more/classes/Autoarray.html +12 -12
  304. data/doc/rdoc/more/classes/BBCode.html +34 -34
  305. data/doc/rdoc/more/classes/BaseX.html +16 -16
  306. data/doc/rdoc/more/classes/BiCrypt.html +67 -67
  307. data/doc/rdoc/more/classes/BinReadable.html +85 -85
  308. data/doc/rdoc/more/classes/BinReadable/ByteOrder.html +25 -25
  309. data/doc/rdoc/more/classes/Binding.html +8 -8
  310. data/doc/rdoc/more/classes/BlankSlate.html +5 -5
  311. data/doc/rdoc/more/classes/Buildable.html +4 -4
  312. data/doc/rdoc/more/classes/BuildingBlock.html +32 -32
  313. data/doc/rdoc/more/classes/Capsule.html +41 -41
  314. data/doc/rdoc/more/classes/Cloneable.html +4 -4
  315. data/doc/rdoc/more/classes/ConsoleUtils.html +22 -22
  316. data/doc/rdoc/more/classes/Coroutine.html +28 -28
  317. data/doc/rdoc/more/classes/Crypt.html +16 -16
  318. data/doc/rdoc/more/classes/CssFilter.html +45 -45
  319. data/doc/rdoc/more/classes/CssTree.html +8 -8
  320. data/doc/rdoc/more/classes/Dictionary.html +228 -228
  321. data/doc/rdoc/more/classes/Downloader.html +56 -56
  322. data/doc/rdoc/more/classes/Duration.html +369 -445
  323. data/doc/rdoc/more/classes/Duration/Numeric.html +389 -0
  324. data/doc/rdoc/more/classes/{CLI/NoCommandError.html → Duration/Time.html} +30 -17
  325. data/doc/rdoc/more/classes/Enumerable.html +114 -51
  326. data/doc/rdoc/more/classes/Enumerable/Elementor.html +16 -16
  327. data/doc/rdoc/more/classes/Enumerable/Enumerator.html +4 -4
  328. data/doc/rdoc/more/classes/Enumerable/Filterable.html +246 -0
  329. data/doc/rdoc/more/classes/EnumerablePass.html +17 -17
  330. data/doc/rdoc/more/classes/{RecursiveDependency.html → Enumerator.html} +7 -4
  331. data/doc/rdoc/more/classes/{CLI.html → Enumerator/Filter.html} +22 -26
  332. data/doc/rdoc/more/classes/Equatable.html +16 -16
  333. data/doc/rdoc/more/classes/Expirable.html +17 -17
  334. data/doc/rdoc/more/classes/FileList.html +125 -125
  335. data/doc/rdoc/more/classes/Fileable.html +14 -14
  336. data/doc/rdoc/more/classes/Fileable/DSL.html +41 -41
  337. data/doc/rdoc/more/classes/Hash.html +16 -162
  338. data/doc/rdoc/more/classes/Hash2Xml.html +4 -4
  339. data/doc/rdoc/more/classes/HtmlFilter.html +9 -9
  340. data/doc/rdoc/more/classes/IORedirect.html +19 -19
  341. data/doc/rdoc/more/classes/InfinityClass.html +36 -36
  342. data/doc/rdoc/more/classes/InfinityClass/Numeric.html +23 -23
  343. data/doc/rdoc/more/classes/Ini.html +37 -37
  344. data/doc/rdoc/more/classes/Instantiable.html +9 -9
  345. data/doc/rdoc/more/classes/Instantize.html +8 -8
  346. data/doc/rdoc/more/classes/Interval.html +187 -187
  347. data/doc/rdoc/more/classes/It.html +12 -12
  348. data/doc/rdoc/more/classes/LRUCache.html +38 -38
  349. data/doc/rdoc/more/classes/LinkedList.html +68 -68
  350. data/doc/rdoc/more/classes/LinkedList/Node.html +4 -4
  351. data/doc/rdoc/more/classes/{DictionaryMatcher.html → Matcher.html} +66 -68
  352. data/doc/rdoc/more/classes/{DictionaryMatcher → Matcher}/MatchData.html +8 -8
  353. data/doc/rdoc/more/classes/{CacheDecorator.html → Memoizer.html} +64 -46
  354. data/doc/rdoc/more/classes/Module.html +182 -361
  355. data/doc/rdoc/more/classes/Multiton.html +12 -12
  356. data/doc/rdoc/more/classes/Multiton/MetaMethods.html +28 -28
  357. data/doc/rdoc/more/classes/Net/SMTP.html +8 -8
  358. data/doc/rdoc/more/classes/NullClass.html +24 -24
  359. data/doc/rdoc/more/classes/Numeric/Multipliers.html +456 -0
  360. data/doc/rdoc/more/classes/ObjectReflection.html +12 -12
  361. data/doc/rdoc/more/classes/OpEsc.html +8 -7
  362. data/doc/rdoc/more/classes/OpenCascade.html +4 -4
  363. data/doc/rdoc/more/classes/OpenCollection.html +8 -8
  364. data/doc/rdoc/more/classes/OpenHash.html +9 -9
  365. data/doc/rdoc/more/classes/{EventHook.html → OpenModule.html} +24 -63
  366. data/doc/rdoc/more/classes/OpenObject.html +95 -95
  367. data/doc/rdoc/more/classes/OpenStructable.html +326 -0
  368. data/doc/rdoc/more/classes/PQueue.html +84 -84
  369. data/doc/rdoc/more/classes/Paramix.html +11 -11
  370. data/doc/rdoc/more/classes/Paramix/Delegator.html +16 -16
  371. data/doc/rdoc/more/classes/PathList.html +8 -8
  372. data/doc/rdoc/more/classes/PathList/Finder.html +8 -8
  373. data/doc/rdoc/more/classes/Platform.html +46 -46
  374. data/doc/rdoc/more/classes/Pool.html +18 -18
  375. data/doc/rdoc/more/classes/Proc.html +9 -9
  376. data/doc/rdoc/more/classes/ProgressBar.html +52 -52
  377. data/doc/rdoc/more/classes/Prototype.html +28 -28
  378. data/doc/rdoc/more/classes/RWDelegator.html +16 -16
  379. data/doc/rdoc/more/classes/Random.html +5 -5
  380. data/doc/rdoc/more/classes/Random/Array.html +37 -37
  381. data/doc/rdoc/more/classes/Random/Hash.html +52 -52
  382. data/doc/rdoc/more/classes/Random/Object.html +4 -4
  383. data/doc/rdoc/more/classes/Random/String.html +34 -34
  384. data/doc/rdoc/more/classes/Random/String/Self.html +9 -9
  385. data/doc/rdoc/more/classes/Recorder.html +16 -16
  386. data/doc/rdoc/more/classes/Reference.html +19 -19
  387. data/doc/rdoc/more/classes/Registerable.html +13 -13
  388. data/doc/rdoc/more/classes/Semaphore.html +36 -36
  389. data/doc/rdoc/more/classes/Settings.html +28 -28
  390. data/doc/rdoc/more/classes/Settings/Setting.html +13 -13
  391. data/doc/rdoc/more/classes/Settings/SettingCollection.html +4 -4
  392. data/doc/rdoc/more/classes/SimpleStringIO.html +8 -8
  393. data/doc/rdoc/more/classes/Snapshot.html +16 -16
  394. data/doc/rdoc/more/classes/Snapshot/ValueHolder.html +12 -12
  395. data/doc/rdoc/more/classes/SparseArray.html +1397 -0
  396. data/doc/rdoc/more/classes/Stash.html +232 -0
  397. data/doc/rdoc/more/classes/String/Mask.html +72 -72
  398. data/doc/rdoc/more/classes/String/Words.html +49 -49
  399. data/doc/rdoc/more/classes/Struct.html +8 -8
  400. data/doc/rdoc/more/classes/SyncArray.html +4 -4
  401. data/doc/rdoc/more/classes/SyncHash.html +4 -4
  402. data/doc/rdoc/more/classes/SyncHash/Delegator.html +28 -28
  403. data/doc/rdoc/more/classes/SyncHash/Inheritor.html +28 -28
  404. data/doc/rdoc/more/classes/System.html +253 -253
  405. data/doc/rdoc/more/classes/Timer.html +48 -48
  406. data/doc/rdoc/more/classes/Timer/Dummy.html +9 -9
  407. data/doc/rdoc/more/classes/TracePoint.html +58 -58
  408. data/doc/rdoc/more/classes/Tuple.html +170 -170
  409. data/doc/rdoc/more/classes/TypeCast/Class.html +4 -4
  410. data/doc/rdoc/more/classes/TypeCast/Object.html +4 -4
  411. data/doc/rdoc/more/classes/Uninheritable.html +6 -6
  412. data/doc/rdoc/more/classes/VersionNumber.html +57 -57
  413. data/doc/rdoc/more/classes/XOXO.html +9 -9
  414. data/doc/rdoc/more/classes/ZipUtils.html +251 -118
  415. data/doc/rdoc/more/classes/ZipUtils/DryRun.html +203 -35
  416. data/doc/rdoc/more/classes/ZipUtils/NoWrite.html +203 -35
  417. data/doc/rdoc/more/classes/ZipUtils/Verbose.html +173 -35
  418. data/doc/rdoc/more/created.rid +1 -1
  419. data/doc/rdoc/more/files/README.html +10 -16
  420. data/doc/rdoc/more/files/lib/more/facets/attr_rb.html +1 -1
  421. data/doc/rdoc/more/files/lib/more/facets/buildable_rb.html +1 -1
  422. data/doc/rdoc/more/files/lib/more/facets/consoleutils_rb.html +1 -18
  423. data/doc/rdoc/more/files/lib/more/facets/dependency_rb.html +1 -1
  424. data/doc/rdoc/more/files/lib/more/facets/duration_rb.html +1 -41
  425. data/doc/rdoc/more/files/lib/more/facets/elementor_rb.html +2 -1
  426. data/doc/rdoc/more/files/lib/more/facets/enumerablepass_rb.html +2 -1
  427. data/doc/rdoc/more/files/lib/more/facets/{fileshell_rb.html → filter_rb.html} +6 -5
  428. data/doc/rdoc/more/files/lib/more/facets/inheritor_rb.html +3 -28
  429. data/doc/rdoc/more/files/lib/more/facets/iteration_rb.html +1 -1
  430. data/doc/rdoc/more/files/lib/more/facets/kernel/meta_rb.html +1 -1
  431. data/doc/rdoc/more/files/lib/more/facets/matcher_rb.html +97 -0
  432. data/doc/rdoc/more/files/lib/more/facets/memoize_rb.html +7 -4
  433. data/doc/rdoc/more/files/lib/more/facets/{cachedecorator_rb.html → memoizer_rb.html} +23 -49
  434. data/doc/rdoc/more/files/lib/more/facets/multipliers_rb.html +2 -18
  435. data/doc/rdoc/more/files/lib/more/facets/nilstatus_rb.html +1 -1
  436. data/doc/rdoc/{core/files/lib/core/facets/callstack_rb.html → more/files/lib/more/facets/openmodule_rb.html} +4 -4
  437. data/doc/rdoc/more/files/lib/more/facets/opesc_rb.html +1 -1
  438. data/doc/rdoc/more/files/lib/more/facets/ostructable_rb.html +92 -0
  439. data/doc/rdoc/more/files/lib/more/facets/pathlist_rb.html +1 -1
  440. data/doc/rdoc/more/files/lib/more/facets/snapshot_rb.html +2 -2
  441. data/doc/rdoc/more/files/lib/more/facets/sparse_array_rb.html +92 -0
  442. data/doc/rdoc/more/files/lib/more/facets/stash_rb.html +166 -0
  443. data/doc/rdoc/more/files/lib/more/facets/string/words_rb.html +1 -1
  444. data/doc/rdoc/more/files/lib/more/facets/succ_rb.html +1 -1
  445. data/doc/rdoc/more/files/lib/more/facets/thread_rb.html +1 -1
  446. data/doc/rdoc/more/files/lib/more/facets/ziputils_rb.html +6 -34
  447. data/doc/rdoc/more/fr_class_index.html +13 -17
  448. data/doc/rdoc/more/fr_file_index.html +7 -15
  449. data/doc/rdoc/more/fr_method_index.html +1079 -1003
  450. data/doc/rdoc/more/index.html +1 -1
  451. data/lib/core/facets/array/conjoin.rb +1 -1
  452. data/lib/core/facets/array/delete.rb +3 -60
  453. data/lib/core/facets/array/delete_unless.rb +15 -0
  454. data/lib/core/facets/array/delete_values.rb +50 -0
  455. data/lib/core/facets/array/index.rb +0 -26
  456. data/lib/core/facets/array/indexable.rb +2 -2
  457. data/lib/core/facets/array/merge.rb +1 -1
  458. data/lib/core/facets/array/only.rb +1 -2
  459. data/lib/core/facets/array/pad.rb +2 -2
  460. data/lib/core/facets/array/permutation.rb +1 -1
  461. data/lib/core/facets/array/product.rb +2 -2
  462. data/lib/core/facets/array/rotate.rb +2 -4
  463. data/lib/core/facets/array/select.rb +1 -1
  464. data/lib/core/facets/array/splice.rb +1 -1
  465. data/lib/core/facets/array/stackable.rb +2 -2
  466. data/lib/core/facets/binding/caller.rb +2 -7
  467. data/lib/core/facets/binding/callstack.rb +1 -0
  468. data/lib/core/facets/binding/defined.rb +0 -1
  469. data/lib/core/facets/bitmask.rb +6 -9
  470. data/lib/core/facets/class/cattr.rb +6 -9
  471. data/lib/core/facets/class/descendents.rb +0 -2
  472. data/lib/core/facets/class/prepend.rb +3 -4
  473. data/lib/core/facets/class/to_proc.rb +0 -20
  474. data/lib/core/facets/comparable/at_least.rb +1 -0
  475. data/lib/core/facets/comparable/at_most.rb +1 -0
  476. data/lib/core/facets/comparable/bound.rb +1 -65
  477. data/lib/core/facets/comparable/cap.rb +34 -0
  478. data/lib/core/facets/comparable/clip.rb +38 -0
  479. data/lib/core/facets/comparable/cmp.rb +3 -3
  480. data/lib/core/facets/comparable/comparable.rb +1 -1
  481. data/lib/core/facets/dir/ascend.rb +2 -5
  482. data/lib/core/facets/dir/multiglob.rb +0 -2
  483. data/lib/core/facets/dir/recurse.rb +1 -2
  484. data/lib/core/facets/enumerable/accumulate.rb +2 -0
  485. data/lib/core/facets/enumerable/cluster_by.rb +1 -1
  486. data/lib/core/facets/enumerable/collect.rb +2 -2
  487. data/lib/core/facets/enumerable/commonality.rb +1 -1
  488. data/lib/core/facets/enumerable/count.rb +1 -1
  489. data/lib/core/facets/enumerable/divide.rb +1 -1
  490. data/lib/core/facets/enumerable/duplicates.rb +2 -2
  491. data/lib/core/facets/enumerable/each_by.rb +1 -1
  492. data/lib/core/facets/enumerable/entropy.rb +2 -2
  493. data/lib/core/facets/enumerable/frequency.rb +1 -1
  494. data/lib/core/facets/enumerable/graph.rb +1 -0
  495. data/lib/core/facets/enumerable/group_by.rb +1 -1
  496. data/lib/core/facets/enumerable/inject.rb +2 -3
  497. data/lib/core/facets/enumerable/map_send.rb +15 -3
  498. data/lib/core/facets/enumerable/mash.rb +4 -5
  499. data/lib/core/facets/enumerable/mode.rb +1 -1
  500. data/lib/core/facets/enumerable/modulate.rb +2 -2
  501. data/lib/core/facets/enumerable/none.rb +1 -1
  502. data/lib/core/facets/enumerable/occur.rb +0 -2
  503. data/lib/core/facets/enumerable/one.rb +1 -1
  504. data/lib/core/facets/enumerable/probability.rb +1 -1
  505. data/lib/core/facets/enumerable/sum.rb +1 -1
  506. data/lib/core/facets/enumerable/take.rb +20 -0
  507. data/lib/core/facets/enumerable/uniq_by.rb +0 -2
  508. data/lib/core/facets/exception/detail.rb +1 -1
  509. data/lib/core/facets/exception/suppress.rb +1 -2
  510. data/lib/core/facets/file/append.rb +1 -1
  511. data/lib/core/facets/file/create.rb +1 -1
  512. data/lib/core/facets/file/null.rb +1 -1
  513. data/lib/core/facets/file/read.rb +3 -3
  514. data/lib/core/facets/file/rewrite.rb +1 -1
  515. data/lib/core/facets/file/rootname.rb +1 -1
  516. data/lib/core/facets/file/split_all.rb +19 -0
  517. data/lib/core/facets/file/split_root.rb +3 -0
  518. data/lib/core/facets/file/write.rb +1 -1
  519. data/lib/core/facets/file/writelines.rb +1 -2
  520. data/lib/core/facets/filetest/root.rb +1 -1
  521. data/lib/core/facets/hash/alias.rb +1 -1
  522. data/lib/core/facets/hash/autonew.rb +1 -17
  523. data/lib/core/facets/hash/collate.rb +1 -1
  524. data/lib/core/facets/hash/delete.rb +3 -3
  525. data/lib/core/facets/hash/insert.rb +1 -1
  526. data/lib/core/facets/hash/inverse.rb +1 -1
  527. data/lib/core/facets/hash/join.rb +1 -1
  528. data/lib/core/facets/hash/keys.rb +3 -3
  529. data/lib/core/facets/hash/op_add.rb +1 -1
  530. data/lib/core/facets/hash/op_and.rb +1 -1
  531. data/lib/core/facets/hash/op_mul.rb +1 -1
  532. data/lib/core/facets/hash/op_or.rb +1 -1
  533. data/lib/core/facets/hash/op_push.rb +1 -1
  534. data/lib/core/facets/hash/op_sub.rb +1 -1
  535. data/lib/core/facets/hash/rekey.rb +11 -7
  536. data/lib/core/facets/hash/replace_each.rb +16 -0
  537. data/lib/core/facets/hash/select.rb +1 -2
  538. data/lib/{more → core}/facets/hash/stringify_keys.rb +0 -0
  539. data/lib/core/facets/hash/symbolize_keys.rb +94 -0
  540. data/lib/core/facets/hash/to_options.rb +1 -0
  541. data/lib/core/facets/hash/to_struct.rb +1 -1
  542. data/lib/core/facets/hash/traverse.rb +2 -2
  543. data/lib/core/facets/hash/update.rb +5 -80
  544. data/lib/core/facets/hash/update_each.rb +18 -0
  545. data/lib/core/facets/hash/update_keys.rb +20 -0
  546. data/lib/core/facets/hash/update_values.rb +20 -0
  547. data/lib/core/facets/hash/weave.rb +1 -1
  548. data/lib/core/facets/hash/zipnew.rb +17 -1
  549. data/lib/core/facets/integer/factorial.rb +1 -1
  550. data/lib/core/facets/integer/multiple.rb +1 -1
  551. data/lib/core/facets/integer/odd.rb +2 -2
  552. data/lib/core/facets/kernel/__here__.rb +8 -0
  553. data/lib/core/facets/kernel/as.rb +2 -2
  554. data/lib/core/facets/kernel/attr_singleton.rb +5 -5
  555. data/lib/core/facets/{callstack.rb → kernel/callstack.rb} +1 -1
  556. data/lib/core/facets/kernel/complete.rb +1 -1
  557. data/lib/core/facets/kernel/constant.rb +1 -1
  558. data/lib/core/facets/kernel/d.rb +1 -5
  559. data/lib/core/facets/kernel/demo.rb +2 -2
  560. data/lib/core/facets/kernel/ergo.rb +2 -2
  561. data/lib/core/facets/kernel/instance_class.rb +1 -1
  562. data/lib/core/facets/kernel/instance_variables.rb +2 -4
  563. data/lib/core/facets/kernel/not_nil.rb +1 -1
  564. data/lib/core/facets/kernel/object_send.rb +1 -1
  565. data/lib/core/facets/kernel/p.rb +1 -1
  566. data/lib/core/facets/kernel/populate.rb +2 -2
  567. data/lib/core/facets/kernel/qua_class.rb +2 -2
  568. data/lib/core/facets/kernel/resc.rb +1 -1
  569. data/lib/core/facets/kernel/respond.rb +1 -1
  570. data/lib/core/facets/kernel/returning.rb +1 -1
  571. data/lib/core/facets/kernel/silence.rb +4 -4
  572. data/lib/core/facets/kernel/try.rb +5 -3
  573. data/lib/core/facets/matchdata/match.rb +1 -1
  574. data/lib/core/facets/matchdata/matchset.rb +2 -2
  575. data/lib/core/facets/metaid.rb +5 -5
  576. data/lib/core/facets/module/abstract.rb +1 -1
  577. data/lib/core/facets/module/alias_accessor.rb +3 -3
  578. data/lib/core/facets/module/alias_method_chain.rb +1 -2
  579. data/lib/core/facets/module/alias_module_function.rb +1 -1
  580. data/lib/core/facets/module/ancestor.rb +1 -1
  581. data/lib/core/facets/module/basename.rb +1 -1
  582. data/lib/core/facets/module/conflict.rb +1 -2
  583. data/lib/core/facets/module/include_function_module.rb +1 -1
  584. data/lib/core/facets/module/instance_methods.rb +4 -6
  585. data/lib/core/facets/module/is.rb +2 -2
  586. data/lib/core/facets/module/modspace.rb +1 -1
  587. data/lib/core/facets/module/module_load.rb +2 -2
  588. data/lib/core/facets/module/nesting.rb +1 -1
  589. data/lib/core/facets/module/op.rb +3 -6
  590. data/lib/core/facets/module/prepend.rb +1 -1
  591. data/lib/core/facets/module/redefine_method.rb +1 -1
  592. data/lib/core/facets/module/rename_method.rb +1 -1
  593. data/lib/core/facets/module/revise.rb +2 -2
  594. data/lib/core/facets/module/spacename.rb +1 -1
  595. data/lib/core/facets/module/wrap_method.rb +1 -1
  596. data/lib/core/facets/nilclass/to_f.rb +1 -1
  597. data/lib/core/facets/numeric/approx.rb +1 -1
  598. data/lib/core/facets/numeric/distance.rb +1 -1
  599. data/lib/core/facets/numeric/round.rb +3 -6
  600. data/lib/core/facets/objectspace.rb +6 -0
  601. data/lib/core/facets/objectspace/classes.rb +11 -0
  602. data/lib/core/facets/proc/bind.rb +1 -1
  603. data/lib/core/facets/proc/compose.rb +2 -2
  604. data/lib/core/facets/proc/to_method.rb +1 -1
  605. data/lib/core/facets/proc/update.rb +1 -1
  606. data/lib/core/facets/range/combine.rb +2 -2
  607. data/lib/core/facets/range/overlap.rb +1 -2
  608. data/lib/core/facets/range/within.rb +2 -4
  609. data/lib/core/facets/regexp/arity.rb +1 -1
  610. data/lib/core/facets/string/align.rb +3 -3
  611. data/lib/core/facets/string/bracket.rb +6 -6
  612. data/lib/core/facets/string/camelcase.rb +1 -1
  613. data/lib/core/facets/string/capitalized.rb +3 -3
  614. data/lib/core/facets/string/chars.rb +1 -1
  615. data/lib/core/facets/string/chomp.rb +2 -2
  616. data/lib/core/facets/string/cleave.rb +1 -1
  617. data/lib/core/facets/string/compress_lines.rb +17 -0
  618. data/lib/core/facets/string/contains.rb +7 -0
  619. data/lib/core/facets/string/divide.rb +1 -1
  620. data/lib/core/facets/string/expand_tab.rb +35 -0
  621. data/lib/core/facets/string/fold.rb +1 -1
  622. data/lib/core/facets/string/indent.rb +25 -0
  623. data/lib/core/facets/string/interpolate.rb +1 -1
  624. data/lib/core/facets/string/line_wrap.rb +1 -1
  625. data/lib/core/facets/string/lines.rb +1 -2
  626. data/lib/core/facets/string/margin.rb +30 -0
  627. data/lib/core/facets/string/methodize.rb +1 -1
  628. data/lib/core/facets/string/mscan.rb +1 -1
  629. data/lib/core/facets/string/natcmp.rb +1 -2
  630. data/lib/core/facets/string/nchar.rb +0 -2
  631. data/lib/core/facets/string/op_sub.rb +1 -1
  632. data/lib/core/facets/string/outdent.rb +1 -0
  633. data/lib/core/facets/string/range.rb +4 -5
  634. data/lib/core/facets/string/rewrite.rb +1 -1
  635. data/lib/core/facets/string/shatter.rb +1 -1
  636. data/lib/core/facets/string/snakecase.rb +1 -1
  637. data/lib/core/facets/string/splice.rb +2 -2
  638. data/lib/core/facets/string/start_with.rb +2 -4
  639. data/lib/core/facets/string/tab.rb +9 -92
  640. data/lib/core/facets/string/tabto.rb +19 -0
  641. data/lib/core/facets/string/titlecase.rb +1 -1
  642. data/lib/core/facets/string/to_re.rb +2 -2
  643. data/lib/core/facets/string/word_wrap.rb +2 -4
  644. data/lib/core/facets/struct.rb +6 -0
  645. data/lib/core/facets/struct/attributes.rb +11 -0
  646. data/lib/core/facets/symbol/chomp.rb +2 -2
  647. data/lib/core/facets/symbol/generate.rb +1 -1
  648. data/lib/core/facets/symbol/not.rb +2 -2
  649. data/lib/core/facets/symbol/succ.rb +1 -1
  650. data/lib/core/facets/symbol/to_proc.rb +2 -3
  651. data/lib/core/facets/time/advance.rb +2 -1
  652. data/lib/core/facets/time/elapse.rb +1 -1
  653. data/lib/core/facets/time/hence.rb +16 -13
  654. data/lib/core/facets/time/stamp.rb +2 -2
  655. data/lib/core/facets/to_hash.rb +1 -1
  656. data/lib/core/facets/unboundmethod/arguments.rb +1 -1
  657. data/lib/core/facets/unboundmethod/name.rb +1 -1
  658. data/lib/lore/facets/date.rb +2 -2
  659. data/lib/lore/facets/enumerator.rb +67 -0
  660. data/lib/lore/facets/ostruct.rb +3 -7
  661. data/lib/more/facets/attr.rb +10 -9
  662. data/lib/more/facets/consoleutils.rb +1 -15
  663. data/lib/more/facets/dependency.rb +1 -1
  664. data/lib/more/facets/duration.rb +271 -525
  665. data/lib/more/facets/filter.rb +121 -0
  666. data/lib/more/facets/inheritor.rb +37 -58
  667. data/lib/more/facets/iteration.rb +1 -1
  668. data/lib/more/facets/kernel/meta.rb +1 -1
  669. data/lib/more/facets/{dictionarymatcher.rb → matcher.rb} +15 -11
  670. data/lib/more/facets/memoize.rb +9 -12
  671. data/lib/more/facets/memoizer.rb +74 -0
  672. data/lib/more/facets/multipliers.rb +54 -66
  673. data/lib/more/facets/nilstatus.rb +3 -2
  674. data/lib/more/facets/openmodule.rb +15 -0
  675. data/lib/more/facets/opesc.rb +1 -1
  676. data/lib/more/facets/ostructable.rb +212 -0
  677. data/lib/more/facets/pathlist.rb +1 -0
  678. data/lib/more/facets/sparse_array.rb +809 -0
  679. data/lib/more/facets/stash.rb +66 -0
  680. data/lib/more/facets/string/words.rb +8 -11
  681. data/lib/more/facets/succ.rb +3 -3
  682. data/lib/more/facets/thread.rb +2 -2
  683. data/lib/more/facets/ziputils.rb +238 -97
  684. data/test/core/array/test_index.rb +17 -0
  685. data/test/core/class/test_cattr.rb +1 -1
  686. data/test/core/class/test_to_proc.rb +13 -0
  687. data/test/core/comparable/test_cap.rb +25 -0
  688. data/test/core/comparable/{test_bound.rb → test_clip.rb} +1 -20
  689. data/test/core/file/test_split_all.rb +32 -0
  690. data/test/core/hash/test_op_mul.rb +1 -1
  691. data/test/core/hash/test_op_push.rb +7 -0
  692. data/test/core/hash/test_replace_each.rb +14 -0
  693. data/test/core/hash/test_update_each.rb +13 -0
  694. data/test/core/hash/test_update_keys.rb +18 -0
  695. data/test/core/hash/test_update_values.rb +12 -0
  696. data/test/core/kernel/test_callstack.rb +1 -1
  697. data/test/core/string/test_indent.rb +13 -0
  698. data/test/core/string/test_margin.rb +100 -0
  699. data/test/core/string/test_outdent.rb +65 -0
  700. data/test/core/string/test_tab.rb +1 -162
  701. data/test/core/string/test_tabto.rb +13 -0
  702. data/test/{more → core}/test_metaid.rb +8 -8
  703. data/test/core/time/test_hence.rb +118 -4
  704. data/test/core/unboundmethod/test_name.rb +1 -1
  705. data/test/more/{test_arguments.rb → test_argvector.rb} +8 -12
  706. data/test/more/test_filter.rb +87 -0
  707. data/test/more/test_memoize.rb +11 -9
  708. data/test/more/test_sparsearray.rb +279 -0
  709. metadata +741 -725
  710. data/demo/bench/bench_load.rb +0 -56
  711. data/demo/bench/enumerable/bench_collect.rb +0 -84
  712. data/demo/bench/enumerable/bench_count.rb +0 -58
  713. data/demo/bench/general/bench_calls.rb +0 -74
  714. data/demo/bench/general/bench_includes.rb +0 -25
  715. data/demo/bench/general/bench_methods.rb +0 -17
  716. data/demo/bench/general/bench_pathname.rb +0 -24
  717. data/demo/bench/general/bench_range.rb +0 -64
  718. data/demo/bench/general/bench_return.rb +0 -56
  719. data/demo/bench/general/bench_yeild.rb +0 -75
  720. data/demo/bench/general/comment_loading/bench.rb +0 -46
  721. data/demo/bench/general/comment_loading/comments_begin.rb +0 -109
  722. data/demo/bench/general/comment_loading/comments_end.rb +0 -127
  723. data/demo/bench/general/comment_loading/comments_none.rb +0 -1
  724. data/demo/bench/general/comment_loading/comments_sharp.rb +0 -125
  725. data/demo/bench/integer/bench_factorial.rb +0 -31
  726. data/demo/sample/annotations/annotations1.rb +0 -22
  727. data/demo/sample/ansicolor/cdiff.rb +0 -20
  728. data/demo/sample/ansicolor/example.rb +0 -82
  729. data/doc/book/notes.rdoc +0 -9
  730. data/doc/rdoc/more/classes/BigDuration.html +0 -323
  731. data/doc/rdoc/more/classes/CLI/Arguments.html +0 -488
  732. data/doc/rdoc/more/classes/CLI/Command.html +0 -316
  733. data/doc/rdoc/more/classes/Chain.html +0 -206
  734. data/doc/rdoc/more/classes/FileShell.html +0 -743
  735. data/doc/rdoc/more/classes/TagIterator.html +0 -581
  736. data/doc/rdoc/more/classes/UploadUtils.html +0 -497
  737. data/doc/rdoc/more/classes/Weekdays.html +0 -218
  738. data/doc/rdoc/more/files/lib/more/facets/annotations_rb.html +0 -180
  739. data/doc/rdoc/more/files/lib/more/facets/arguments_rb.html +0 -142
  740. data/doc/rdoc/more/files/lib/more/facets/cattr_rb.html +0 -125
  741. data/doc/rdoc/more/files/lib/more/facets/chain_rb.html +0 -114
  742. data/doc/rdoc/more/files/lib/more/facets/command_rb.html +0 -170
  743. data/doc/rdoc/more/files/lib/more/facets/eventhook_rb.html +0 -141
  744. data/doc/rdoc/more/files/lib/more/facets/tagiterator_rb.html +0 -111
  745. data/doc/rdoc/more/files/lib/more/facets/times_rb.html +0 -163
  746. data/doc/rdoc/more/files/lib/more/facets/uploadutils_rb.html +0 -176
  747. data/lib/more/facets/annotations.rb +0 -302
  748. data/lib/more/facets/arguments.rb +0 -365
  749. data/lib/more/facets/bytes.rb +0 -175
  750. data/lib/more/facets/cachedecorator.rb +0 -117
  751. data/lib/more/facets/chain.rb +0 -58
  752. data/lib/more/facets/command.rb +0 -439
  753. data/lib/more/facets/eventhook.rb +0 -132
  754. data/lib/more/facets/fileshell.rb +0 -202
  755. data/lib/more/facets/hash/symbolize_keys.rb +0 -94
  756. data/lib/more/facets/tagiter.rb +0 -366
  757. data/lib/more/facets/times.rb +0 -431
  758. data/lib/more/facets/uploadutils.rb +0 -464
  759. data/test/core/hash/test_update.rb +0 -46
  760. data/test/more/test_annotations.rb +0 -120
  761. data/test/more/test_bytes.rb +0 -71
  762. data/test/more/test_command.rb +0 -69
  763. data/test/more/test_times.rb +0 -89
@@ -12,8 +12,6 @@ class String
12
12
  # str.nchar(4, 'that') #=> "that"
13
13
  # str #=> "that is text"
14
14
  #
15
- # CREDIT: ?
16
-
17
15
  def nchar(n, replacement=nil)
18
16
  if replacement
19
17
  s = self.dup
@@ -4,7 +4,7 @@ class String
4
4
  #
5
5
  # "HELLO HELLO" - "LL" #=> "HEO HEO"
6
6
  #
7
- # CREDIT: Benjamin David Oakes
7
+ # CREDIT: Benjamin David Oakes
8
8
 
9
9
  def -(pattern)
10
10
  self.gsub(pattern, '')
@@ -0,0 +1 @@
1
+ require 'facets/string/indent'
@@ -4,7 +4,7 @@ class String
4
4
  #
5
5
  # "This is a test!".range('test') #=> 10..13
6
6
  #
7
- # CREDIT: Trans
7
+ # CREDIT: Trans
8
8
 
9
9
  def range(s, offset=0)
10
10
  if index(s, offset)
@@ -19,7 +19,7 @@ class String
19
19
  #
20
20
  # TODO: Add offset, perhaps ?
21
21
  #
22
- # CREDIT: Trans
22
+ # CREDIT: Trans
23
23
 
24
24
  def range_all(s, reuse=false)
25
25
  r = []; i = 0
@@ -41,7 +41,7 @@ class String
41
41
  # "this\nis\na\ntest".range_of_line
42
42
  # #=> [0..4, 5..7, 8..9, 10..13]
43
43
  #
44
- # CREDIT: Trans
44
+ # CREDIT: Trans
45
45
 
46
46
  def range_of_line
47
47
  offset=0; charmap = []
@@ -61,7 +61,7 @@ class String
61
61
  # "bbb".index_all('bb', false) #=> [0]
62
62
  # "bbb".index_all('bb', true) #=> [0,1]
63
63
  #
64
- # TODO: Culd probably be defined for Indexable in general too.
64
+ # TODO: Culd probably be defined for Indexable in general too.
65
65
 
66
66
  def index_all(s, reuse=false)
67
67
  s = Regexp.new(Regexp.escape(s)) unless Regexp===s
@@ -74,4 +74,3 @@ class String
74
74
  end
75
75
 
76
76
  end
77
-
@@ -13,7 +13,7 @@ class String
13
13
  # === Output:
14
14
  # The rewritten string.
15
15
  #
16
- # CREDIT: George Moschovitis
16
+ # CREDIT: George Moschovitis
17
17
 
18
18
  def rewrite(rules)
19
19
  raise ArgumentError.new('The rules parameter is nil') unless rules
@@ -10,7 +10,7 @@ class String
10
10
  #
11
11
  # ["<p>", "This", "<b>", "is", "</b>", "a test.", "</p>"]
12
12
  #
13
- # CREDIT: Trans
13
+ # CREDIT: Trans
14
14
 
15
15
  def shatter( re )
16
16
  r = self.gsub( re ){ |s| "\1" + s + "\1" }
@@ -8,7 +8,7 @@ class String
8
8
  # "SnakeCase".snakecase #=> "snake_case"
9
9
  # "Snake-Case".snakecase #=> "snake_case"
10
10
  # "SnakeCase::Errors".underscore #=> "snake_case/errors"
11
-
11
+ #
12
12
  def snakecase
13
13
  gsub(/::/, '/'). # NOT SO SURE ABOUT THIS -T
14
14
  gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
@@ -15,7 +15,7 @@ class String
15
15
  # a.splice(1) #=> "E"
16
16
  # a #=> "HLLO"
17
17
  #
18
- # CREDIT: Trans
18
+ # CREDIT: Trans
19
19
 
20
20
  def splice(idx, sub=nil)
21
21
  if sub
@@ -23,7 +23,7 @@ class String
23
23
  else
24
24
  case idx
25
25
  when Range
26
- slice!(idx)
26
+ slice!(idx)
27
27
  else
28
28
  slice!(idx,1)
29
29
  end
@@ -7,8 +7,7 @@ unless (RUBY_VERSION[0,3] == '1.9')
7
7
  # "hello".starts_with?("he") #=> true
8
8
  # "hello".starts_with?("to") #=> false
9
9
  #
10
- # CREDIT: Lucas Carlson
11
- # CREDIT: Blaine Cook
10
+ # CREDIT: Lucas Carlson, Blaine Cook
12
11
 
13
12
  def start_with?(prefix)
14
13
  self.index(prefix) == 0
@@ -19,8 +18,7 @@ unless (RUBY_VERSION[0,3] == '1.9')
19
18
  # "hello".ends_with?("lo") #=> true
20
19
  # "hello".ends_with?("to") #=> false
21
20
  #
22
- # CREDIT: Lucas Carlson
23
- # CREDIT: Blaine Cook
21
+ # CREDIT: Lucas Carlson, Blaine Cook
24
22
 
25
23
  def end_with?(suffix)
26
24
  self.rindex(suffix) == size - suffix.size
@@ -1,103 +1,20 @@
1
- class String
1
+ require 'facets/string/tabto'
2
+ require 'facets/string/margin'
3
+ require 'facets/string/indent'
4
+ require 'facets/string/expand_tab'
2
5
 
3
- # LOG: DEPRECATED #whitespace?, alias of #blank?
4
- #alias whitespace? blank?
6
+ class String
5
7
 
6
8
  # Aligns each line n spaces.
7
9
  #
8
- # CREDIT: Gavin Sinclair
9
-
10
+ # CREDIT: Gavin Sinclair
11
+ #
10
12
  def tab(n)
11
13
  gsub(/^ */, ' ' * n)
12
14
  end
13
15
 
14
- # Alias of tab that will be deprecated.
15
- alias_method :taballto, :tab
16
-
17
- # Expands tabs to +n+ spaces. Non-destructive. If +n+ is 0, then tabs are
18
- # simply removed. Raises an exception if +n+ is negative.
19
- #
20
- # Thanks to GGaramuno for a more efficient algorithm. Very nice.
21
- #
22
- # CREDIT: Gavin Sinclair
23
- # CREDIT: Noah Gibbs
24
- # CREDIT: GGaramuno
25
-
26
- def expand_tabs(n=8)
27
- n = n.to_int
28
- raise ArgumentError, "n must be >= 0" if n < 0
29
- return gsub(/\t/, "") if n == 0
30
- return gsub(/\t/, " ") if n == 1
31
- str = self.dup
32
- while
33
- str.gsub!(/^([^\t\n]*)(\t+)/) { |f|
34
- val = ( n * $2.size - ($1.size % n) )
35
- $1 << (' ' * val)
36
- }
37
- end
38
- str
39
- end
40
-
41
- # Preserves relative tabbing.
42
- # The first non-empty line ends up with n spaces before nonspace.
43
- #
44
- # CREDIT: Gavin Sinclair
45
-
46
- def tabto(n)
47
- if self =~ /^( *)\S/
48
- indent(n - $1.length)
49
- else
50
- self
51
- end
52
- end
53
-
54
- # Indent left or right by n spaces.
55
- # (This used to be called #tab and aliased as #indent.)
56
- #
57
- # CREDIT: Gavin Sinclair
58
- # CREDIT: Trans
59
-
60
- def indent(n)
61
- if n >= 0
62
- gsub(/^/, ' ' * n)
63
- else
64
- gsub(/^ {0,#{-n}}/, "")
65
- end
66
- end
67
-
68
- # Outdent just indents a negative number of spaces.
69
- #
70
- # CREDIT: Noah Gibbs
71
-
72
- def outdent(n)
73
- indent(-n)
74
- end
75
-
76
- # Provides a margin controlled string.
77
- #
78
- # x = %Q{
79
- # | This
80
- # | is
81
- # | margin controlled!
82
- # }.margin
83
- #
84
- #
85
- # NOTE: This may still need a bit of tweaking.
86
- #
87
- # CREDIT: Trans
88
-
89
- def margin(n=0)
90
- #d = /\A.*\n\s*(.)/.match( self )[1]
91
- #d = /\A\s*(.)/.match( self)[1] unless d
92
- d = ((/\A.*\n\s*(.)/.match(self)) ||
93
- (/\A\s*(.)/.match(self)))[1]
94
- return '' unless d
95
- if n == 0
96
- gsub(/\n\s*\Z/,'').gsub(/^\s*[#{d}]/, '')
97
- else
98
- gsub(/\n\s*\Z/,'').gsub(/^\s*[#{d}]/, ' ' * n)
99
- end
100
- end
16
+ # LOG: Deprecated #taballto which was an alias for #tab.
17
+ #alias_method :taballto, :tab
101
18
 
102
19
  end
103
20
 
@@ -0,0 +1,19 @@
1
+ require 'facets/string/indent'
2
+
3
+ class String
4
+
5
+ # Preserves relative tabbing.
6
+ # The first non-empty line ends up with n spaces before nonspace.
7
+ #
8
+ # CREDIT: Gavin Sinclair
9
+
10
+ def tabto(n)
11
+ if self =~ /^( *)\S/
12
+ indent(n - $1.length)
13
+ else
14
+ self
15
+ end
16
+ end
17
+
18
+ end
19
+
@@ -5,7 +5,7 @@ class String
5
5
  # "this is a string".titlecase
6
6
  # => "This Is A String"
7
7
  #
8
- # CREDIT: Eliazar Parra
8
+ # CREDIT: Eliazar Parra
9
9
 
10
10
  def titlecase
11
11
  gsub(/\b\w/){$&.upcase}
@@ -4,7 +4,7 @@ class String
4
4
  #
5
5
  # "a?".to_re #=> /a?/
6
6
  #
7
- # CREDIT: Trans
7
+ # CREDIT: Trans
8
8
 
9
9
  def to_re(esc=false)
10
10
  Regexp.new((esc ? Regexp.escape(self) : self))
@@ -16,7 +16,7 @@ class String
16
16
  #
17
17
  # "[".to_rx #=> /\[/
18
18
  #
19
- # CREDIT: Trans
19
+ # CREDIT: Trans
20
20
 
21
21
  def to_rx(esc=true)
22
22
  Regexp.new((esc ? Regexp.escape(self) : self))
@@ -13,8 +13,7 @@ class String
13
13
  # This is basic implementation of word wrap, but smart
14
14
  # enough to suffice for most use cases.
15
15
  #
16
- # CREDIT: Gavin Kistner
17
- # CREDIT: Dayne Broderson
16
+ # CREDIT: Gavin Kistner, Dayne Broderson
18
17
  #
19
18
  def word_wrap( col_width=80 )
20
19
  self.dup.word_wrap!( col_width )
@@ -22,8 +21,7 @@ class String
22
21
 
23
22
  # As with #word_wrap, but modifies the string in place.
24
23
  #
25
- # CREDIT: Gavin Kistner
26
- # CREDIT: Dayne Broderson
24
+ # CREDIT: Gavin Kistner, Dayne Broderson
27
25
  #
28
26
  def word_wrap!( col_width=80 )
29
27
  self.gsub!( /(\S{#{col_width}})(?=\S)/, '\1 ' )
@@ -0,0 +1,6 @@
1
+ dir, base = *File.split(__FILE__)
2
+ base = base.chomp('.rb')
3
+ Dir[File.join(dir, base, '*')].each do |lib|
4
+ require "facets/#{base}/#{File.basename(lib)}"
5
+ end
6
+
@@ -0,0 +1,11 @@
1
+ class Struct
2
+
3
+ # Returns a hash containing the names and values for all instance variables in the Struct.
4
+ def attributes
5
+ h = {}
6
+ each_pair { |k,v| h[k] = v }
7
+ h
8
+ end
9
+
10
+ end # class Struct
11
+
@@ -4,7 +4,7 @@ class Symbol
4
4
  #
5
5
  # :ab.chomp(:b) #=> :a
6
6
  #
7
- # CREDIT: Trans
7
+ # CREDIT: Trans
8
8
 
9
9
  def chomp(seperator)
10
10
  to_s.chomp(seperator.to_s).to_sym
@@ -14,7 +14,7 @@ class Symbol
14
14
  #
15
15
  # :ab.lchomp(:a) #=> :b
16
16
  #
17
- # CREDIT: Trans
17
+ # CREDIT: Trans
18
18
 
19
19
  def lchomp(seperator)
20
20
  to_s.reverse.chomp(seperator.to_s).reverse.to_sym
@@ -10,7 +10,7 @@ class Symbol
10
10
  #
11
11
  # TODO: Is the generated symbol format acceptable?
12
12
  #
13
- # CREDIT: Trans
13
+ # CREDIT: Trans
14
14
 
15
15
  def self.generate(key=nil)
16
16
  key = key.to_sym if key
@@ -5,7 +5,7 @@ class Symbol
5
5
  # "friend".to_sym.not? #=> false
6
6
  # "~friend".to_sym.not? #=> true
7
7
  #
8
- # CREDIT: Trans
8
+ # CREDIT: Trans
9
9
 
10
10
  def not?
11
11
  self.to_s.slice(0,1) == '~'
@@ -15,7 +15,7 @@ class Symbol
15
15
  #
16
16
  # ~:friend #=> :"~friend"
17
17
  #
18
- # CREDIT: Trans
18
+ # CREDIT: Trans
19
19
 
20
20
  def ~@
21
21
  if self.to_s.slice(0,1) == '~'
@@ -8,7 +8,7 @@ unless (RUBY_VERSION[0,3] == '1.9')
8
8
  #
9
9
  # :a.succ => :b
10
10
  #
11
- # TODO: Make this work more like a simple character dial?
11
+ # TODO: Make this work more like a simple character dial?
12
12
 
13
13
  def succ
14
14
  self.to_s.succ.intern
@@ -19,10 +19,9 @@ unless (RUBY_VERSION[0,3] == '1.9')
19
19
  # %{john terry fiona}.map(&:capitalize) # -> %{John Terry Fiona}
20
20
  # sum = numbers.inject(&:+)
21
21
  #
22
- # TODO: This will be deprecated as of Ruby 1.9, since it will become standard Ruby.
22
+ # TODO: This will be deprecated as of Ruby 1.9, since it will become standard Ruby.
23
23
  #
24
- # CREDIT: Florian Gross (orignal)
25
- # CREDIT: Nobuhiro Imai (current)
24
+ # CREDIT: Florian Gross (orignal), Nobuhiro Imai (current)
26
25
 
27
26
  def to_proc
28
27
  Proc.new{|*args| args.shift.__send__(self, *args)}
@@ -5,7 +5,8 @@ class Time
5
5
  # <tt>:months</tt>, <tt>:weeks</tt>, <tt>:days</tt>, <tt>:hours</tt>,
6
6
  # <tt>:minutes</tt>, <tt>:seconds</tt>.
7
7
  #
8
- # CREDIT: ActiveSupport
8
+ # CREDIT: ActiveSupport Team
9
+
9
10
  def advance(options)
10
11
  d = to_date.advance(options)
11
12
  time_advanced_by_date = change(:year => d.year, :month => d.month, :day => d.day)
@@ -4,7 +4,7 @@ class Time
4
4
  #
5
5
  # Time.elapse { sleep 1 } #=> 0.999188899993896
6
6
  #
7
- # CREDIT: Hal Fulton
7
+ # CREDIT: Hal Fulton
8
8
 
9
9
  def self.elapse
10
10
  raise "Need block" unless block_given?
@@ -2,7 +2,7 @@ require 'facets/time/set'
2
2
 
3
3
  class Time
4
4
 
5
- if defined?(::ActiveSupport)
5
+ if defined?(::ActiveSupport) && method_defined?(:since)
6
6
 
7
7
  alias_method :in, :since
8
8
  alias_method :hence, :since
@@ -13,15 +13,16 @@ class Time
13
13
  # a number of time-units ago.
14
14
  #
15
15
  def ago(number, units=:seconds)
16
- time =(
16
+ return hence(-number, units) if number < 0
17
+
18
+ time = (
17
19
  case units.to_s.downcase.to_sym
18
20
  when :years
19
21
  set(:year => (year - number))
20
22
  when :months
21
- #years = ((month - number) / 12).to_i
22
- y = ((month - number) / 12).to_i
23
- m = ((month - number - 1) % 12) + 1
24
- set(:year => (year - y), :month => m)
23
+ new_month = ((month - number - 1) % 12) + 1
24
+ y = (number / 12) + (new_month > month ? 1 : 0)
25
+ set(:year => (year - y), :month => new_month)
25
26
  when :weeks
26
27
  self - (number * 604800)
27
28
  when :days
@@ -43,14 +44,16 @@ class Time
43
44
  # a number of time-units hence.
44
45
 
45
46
  def hence(number, units=:seconds)
46
- time =(
47
+ return ago(-number, units) if number < 0
48
+
49
+ time = (
47
50
  case units.to_s.downcase.to_sym
48
51
  when :years
49
52
  set( :year=>(year + number) )
50
53
  when :months
51
- y = ((month + number) / 12).to_i
52
- m = ((month + number - 1) % 12) + 1
53
- set(:year => (year + y), :month => m)
54
+ new_month = ((month + number - 1) % 12) + 1
55
+ y = (number / 12) + (new_month < month ? 1 : 0)
56
+ set(:year => (year + y), :month => new_month)
54
57
  when :weeks
55
58
  self + (number * 604800)
56
59
  when :days
@@ -74,9 +77,9 @@ class Time
74
77
  # Adjust DST
75
78
  #
76
79
  # TODO: Can't seem to get this to pass ActiveSupport tests.
77
- # Even though it is essentially identical to the
78
- # ActiveSupport code (see Time#since in time/calculations.rb).
79
- # It handels all but 4 tests.
80
+ # Even though it is essentially identical to the
81
+ # ActiveSupport code (see Time#since in time/calculations.rb).
82
+ # It handles all but 4 tests.
80
83
  def dst_adjustment(time)
81
84
  self_dst = self.dst? ? 1 : 0
82
85
  time_dst = time.dst? ? 1 : 0