backports 3.16.0 → 3.16.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (404) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +658 -0
  3. data/README.md +524 -0
  4. data/backports.gemspec +5 -1
  5. data/lib/backports/1.8.7.rb +7 -0
  6. data/lib/backports/1.9.2/stdlib/matrix.rb +5 -0
  7. data/lib/backports/rails/array.rb +4 -0
  8. data/lib/backports/rails/enumerable.rb +4 -0
  9. data/lib/backports/rails/hash.rb +4 -0
  10. data/lib/backports/rails/kernel.rb +4 -0
  11. data/lib/backports/rails/module.rb +4 -0
  12. data/lib/backports/rails/string.rb +4 -0
  13. data/lib/backports/std_lib.rb +3 -0
  14. data/lib/backports/tools/deprecation.rb +12 -0
  15. data/lib/backports/version.rb +1 -1
  16. metadata +7 -511
  17. data/.document +0 -6
  18. data/.gitignore +0 -9
  19. data/.gitmodules +0 -6
  20. data/.irbrc +0 -3
  21. data/.travis.yml +0 -19
  22. data/CHANGELOG.rdoc +0 -504
  23. data/README.rdoc +0 -445
  24. data/Rakefile +0 -192
  25. data/default.mspec +0 -14
  26. data/frozen_old_spec/tags/1.8.6/core/argf/each_line_spec.rb +0 -6
  27. data/frozen_old_spec/tags/1.8.6/core/argf/each_spec.rb +0 -6
  28. data/frozen_old_spec/tags/1.8.6/core/argf/lines_spec.rb +0 -6
  29. data/frozen_old_spec/tags/1.8.6/core/array/append_spec.rb +0 -1
  30. data/frozen_old_spec/tags/1.8.6/core/array/collect_spec.rb +0 -7
  31. data/frozen_old_spec/tags/1.8.6/core/array/rotate_spec.rb +0 -2
  32. data/frozen_old_spec/tags/1.8.6/core/array/uniq_spec.rb +0 -3
  33. data/frozen_old_spec/tags/1.8.6/core/complex/to_r_spec.rb +0 -3
  34. data/frozen_old_spec/tags/1.8.6/core/enumerable/all_spec.rb +0 -1
  35. data/frozen_old_spec/tags/1.8.6/core/enumerable/any_spec.rb +0 -2
  36. data/frozen_old_spec/tags/1.8.6/core/enumerable/each_entry_spec.rb +0 -1
  37. data/frozen_old_spec/tags/1.8.6/core/enumerable/none_spec.rb +0 -1
  38. data/frozen_old_spec/tags/1.8.6/core/enumerable/one_spec.rb +0 -1
  39. data/frozen_old_spec/tags/1.8.6/core/enumerator/next_spec.rb +0 -1
  40. data/frozen_old_spec/tags/1.8.6/core/env/to_h_spec.rb +0 -2
  41. data/frozen_old_spec/tags/1.8.6/core/file/join_spec.rb +0 -3
  42. data/frozen_old_spec/tags/1.8.6/core/file/lchmod_spec.rb +0 -2
  43. data/frozen_old_spec/tags/1.8.6/core/file/new_spec.rb +0 -2
  44. data/frozen_old_spec/tags/1.8.6/core/file/open_spec.rb +0 -13
  45. data/frozen_old_spec/tags/1.8.6/core/file/to_path_spec.rb +0 -1
  46. data/frozen_old_spec/tags/1.8.6/core/fixnum/fdiv_spec.rb +0 -1
  47. data/frozen_old_spec/tags/1.8.6/core/gc/stress_spec.rb +0 -2
  48. data/frozen_old_spec/tags/1.8.6/core/hash/assoc_spec.rb +0 -1
  49. data/frozen_old_spec/tags/1.8.6/core/hash/constructor_spec.rb +0 -3
  50. data/frozen_old_spec/tags/1.8.6/core/hash/default_proc_spec.rb +0 -3
  51. data/frozen_old_spec/tags/1.8.6/core/hash/delete_if_spec.rb +0 -1
  52. data/frozen_old_spec/tags/1.8.6/core/hash/each_pair_spec.rb +0 -1
  53. data/frozen_old_spec/tags/1.8.6/core/hash/eql_spec.rb +0 -3
  54. data/frozen_old_spec/tags/1.8.6/core/hash/hash_spec.rb +0 -3
  55. data/frozen_old_spec/tags/1.8.6/core/hash/keep_if_spec.rb +0 -2
  56. data/frozen_old_spec/tags/1.8.6/core/hash/rassoc_spec.rb +0 -1
  57. data/frozen_old_spec/tags/1.8.6/core/hash/reject_spec.rb +0 -2
  58. data/frozen_old_spec/tags/1.8.6/core/hash/select_spec.rb +0 -8
  59. data/frozen_old_spec/tags/1.8.6/core/integer/round_spec.rb +0 -2
  60. data/frozen_old_spec/tags/1.8.6/core/io/binread_spec.rb +0 -7
  61. data/frozen_old_spec/tags/1.8.6/core/io/chars_spec.rb +0 -1
  62. data/frozen_old_spec/tags/1.8.6/core/io/each_char_spec.rb +0 -1
  63. data/frozen_old_spec/tags/1.8.6/core/io/lines_spec.rb +0 -1
  64. data/frozen_old_spec/tags/1.8.6/core/io/open_spec.rb +0 -24
  65. data/frozen_old_spec/tags/1.8.6/core/io/ungetbyte_spec.rb +0 -4
  66. data/frozen_old_spec/tags/1.8.6/core/io/write_spec.rb +0 -5
  67. data/frozen_old_spec/tags/1.8.6/core/kernel/__callee___spec.rb +0 -6
  68. data/frozen_old_spec/tags/1.8.6/core/kernel/__method___spec.rb +0 -1
  69. data/frozen_old_spec/tags/1.8.6/core/kernel/define_singleton_method_spec.rb +0 -2
  70. data/frozen_old_spec/tags/1.8.6/core/kernel/public_method_spec.rb +0 -2
  71. data/frozen_old_spec/tags/1.8.6/core/kernel/require_relative_spec.rb +0 -3
  72. data/frozen_old_spec/tags/1.8.6/core/math/log2_spec.rb +0 -6
  73. data/frozen_old_spec/tags/1.8.6/core/math/log_spec.rb +0 -3
  74. data/frozen_old_spec/tags/1.8.6/core/module/alias_method_spec.rb +0 -1
  75. data/frozen_old_spec/tags/1.8.6/core/module/attr_accessor_spec.rb +0 -2
  76. data/frozen_old_spec/tags/1.8.6/core/module/attr_reader_spec.rb +0 -2
  77. data/frozen_old_spec/tags/1.8.6/core/module/attr_spec.rb +0 -1
  78. data/frozen_old_spec/tags/1.8.6/core/module/attr_writer_spec.rb +0 -2
  79. data/frozen_old_spec/tags/1.8.6/core/module/class_exec_spec.rb +0 -2
  80. data/frozen_old_spec/tags/1.8.6/core/module/define_method_spec.rb +0 -1
  81. data/frozen_old_spec/tags/1.8.6/core/module/module_exec_spec.rb +0 -2
  82. data/frozen_old_spec/tags/1.8.6/core/module/remove_method_spec.rb +0 -1
  83. data/frozen_old_spec/tags/1.8.6/core/module/undef_method_spec.rb +0 -1
  84. data/frozen_old_spec/tags/1.8.6/core/nil/dup_spec.rb +0 -1
  85. data/frozen_old_spec/tags/1.8.6/core/numeric/step_spec.rb +0 -12
  86. data/frozen_old_spec/tags/1.8.6/core/proc/curry_spec.rb +0 -4
  87. data/frozen_old_spec/tags/1.8.6/core/range/step_spec.rb +0 -12
  88. data/frozen_old_spec/tags/1.8.6/core/string/getbyte_spec.rb +0 -6
  89. data/frozen_old_spec/tags/1.8.6/core/string/partition_spec.rb +0 -1
  90. data/frozen_old_spec/tags/1.8.6/core/string/prepend_spec.rb +0 -1
  91. data/frozen_old_spec/tags/1.8.6/core/string/rpartition_spec.rb +0 -1
  92. data/frozen_old_spec/tags/1.8.6/core/string/setbyte_spec.rb +0 -5
  93. data/frozen_old_spec/tags/1.8.6/core/string/upto_spec.rb +0 -1
  94. data/frozen_old_spec/tags/1.8.6/core/symbol/capitalize_spec.rb +0 -3
  95. data/frozen_old_spec/tags/1.8.6/core/symbol/comparison_spec.rb +0 -1
  96. data/frozen_old_spec/tags/1.8.6/core/symbol/downcase_spec.rb +0 -2
  97. data/frozen_old_spec/tags/1.8.6/core/symbol/element_reference_spec.rb +0 -4
  98. data/frozen_old_spec/tags/1.8.6/core/symbol/empty_spec.rb +0 -1
  99. data/frozen_old_spec/tags/1.8.6/core/symbol/match_spec.rb +0 -2
  100. data/frozen_old_spec/tags/1.8.6/core/symbol/swapcase_spec.rb +0 -2
  101. data/frozen_old_spec/tags/1.8.6/core/symbol/to_proc_spec.rb +0 -1
  102. data/frozen_old_spec/tags/1.8.6/core/symbol/upcase_spec.rb +0 -1
  103. data/frozen_old_spec/tags/1.8.7/core/array/append_spec.rb +0 -1
  104. data/frozen_old_spec/tags/1.8.7/core/array/keep_if_spec.rb +0 -2
  105. data/frozen_old_spec/tags/1.8.7/core/array/rotate_spec.rb +0 -2
  106. data/frozen_old_spec/tags/1.8.7/core/array/select_spec.rb +0 -2
  107. data/frozen_old_spec/tags/1.8.7/core/array/uniq_spec.rb +0 -3
  108. data/frozen_old_spec/tags/1.8.7/core/complex/to_r_spec.rb +0 -3
  109. data/frozen_old_spec/tags/1.8.7/core/enumerable/all_spec.rb +0 -1
  110. data/frozen_old_spec/tags/1.8.7/core/enumerable/any_spec.rb +0 -2
  111. data/frozen_old_spec/tags/1.8.7/core/enumerable/collect_concat_spec.rb +0 -1
  112. data/frozen_old_spec/tags/1.8.7/core/enumerable/flat_map_spec.rb +0 -1
  113. data/frozen_old_spec/tags/1.8.7/core/enumerable/none_spec.rb +0 -1
  114. data/frozen_old_spec/tags/1.8.7/core/enumerable/one_spec.rb +0 -1
  115. data/frozen_old_spec/tags/1.8.7/core/env/to_h_spec.rb +0 -2
  116. data/frozen_old_spec/tags/1.8.7/core/file/lchmod_spec.rb +0 -2
  117. data/frozen_old_spec/tags/1.8.7/core/file/new_spec.rb +0 -1
  118. data/frozen_old_spec/tags/1.8.7/core/file/open_spec.rb +0 -5
  119. data/frozen_old_spec/tags/1.8.7/core/file/readlink_spec.rb +0 -6
  120. data/frozen_old_spec/tags/1.8.7/core/file/to_path_spec.rb +0 -1
  121. data/frozen_old_spec/tags/1.8.7/core/hash/assoc_spec.rb +0 -1
  122. data/frozen_old_spec/tags/1.8.7/core/hash/default_proc_spec.rb +0 -3
  123. data/frozen_old_spec/tags/1.8.7/core/hash/keep_if_spec.rb +0 -2
  124. data/frozen_old_spec/tags/1.8.7/core/hash/merge_spec.rb +0 -3
  125. data/frozen_old_spec/tags/1.8.7/core/hash/rassoc_spec.rb +0 -1
  126. data/frozen_old_spec/tags/1.8.7/core/hash/select_spec.rb +0 -1
  127. data/frozen_old_spec/tags/1.8.7/core/hash/to_h_spec.rb +0 -1
  128. data/frozen_old_spec/tags/1.8.7/core/hash/update_spec.rb +0 -3
  129. data/frozen_old_spec/tags/1.8.7/core/integer/round_spec.rb +0 -2
  130. data/frozen_old_spec/tags/1.8.7/core/io/binread_spec.rb +0 -7
  131. data/frozen_old_spec/tags/1.8.7/core/io/open_spec.rb +0 -32
  132. data/frozen_old_spec/tags/1.8.7/core/io/ungetbyte_spec.rb +0 -4
  133. data/frozen_old_spec/tags/1.8.7/core/io/write_spec.rb +0 -5
  134. data/frozen_old_spec/tags/1.8.7/core/kernel/__callee___spec.rb +0 -6
  135. data/frozen_old_spec/tags/1.8.7/core/kernel/define_singleton_method_spec.rb +0 -2
  136. data/frozen_old_spec/tags/1.8.7/core/kernel/public_method_spec.rb +0 -1
  137. data/frozen_old_spec/tags/1.8.7/core/kernel/require_relative_spec.rb +0 -3
  138. data/frozen_old_spec/tags/1.8.7/core/math/log2_spec.rb +0 -6
  139. data/frozen_old_spec/tags/1.8.7/core/math/log_spec.rb +0 -3
  140. data/frozen_old_spec/tags/1.8.7/core/module/alias_method_spec.rb +0 -7
  141. data/frozen_old_spec/tags/1.8.7/core/module/attr_accessor_spec.rb +0 -2
  142. data/frozen_old_spec/tags/1.8.7/core/module/attr_reader_spec.rb +0 -2
  143. data/frozen_old_spec/tags/1.8.7/core/module/attr_spec.rb +0 -2
  144. data/frozen_old_spec/tags/1.8.7/core/module/attr_writer_spec.rb +0 -2
  145. data/frozen_old_spec/tags/1.8.7/core/module/define_method_spec.rb +0 -1
  146. data/frozen_old_spec/tags/1.8.7/core/module/include_spec.rb +0 -3
  147. data/frozen_old_spec/tags/1.8.7/core/module/remove_method_spec.rb +0 -3
  148. data/frozen_old_spec/tags/1.8.7/core/module/undef_method_spec.rb +0 -3
  149. data/frozen_old_spec/tags/1.8.7/core/nil/dup_spec.rb +0 -1
  150. data/frozen_old_spec/tags/1.8.7/core/proc/curry_spec.rb +0 -3
  151. data/frozen_old_spec/tags/1.8.7/core/proc/yield_spec.rb +0 -4
  152. data/frozen_old_spec/tags/1.8.7/core/range/size_spec.rb +0 -1
  153. data/frozen_old_spec/tags/1.8.7/core/string/getbyte_spec.rb +0 -5
  154. data/frozen_old_spec/tags/1.8.7/core/string/prepend_spec.rb +0 -1
  155. data/frozen_old_spec/tags/1.8.7/core/string/setbyte_spec.rb +0 -5
  156. data/frozen_old_spec/tags/1.8.7/core/struct/new_spec.rb +0 -3
  157. data/frozen_old_spec/tags/1.8.7/core/symbol/capitalize_spec.rb +0 -3
  158. data/frozen_old_spec/tags/1.8.7/core/symbol/comparison_spec.rb +0 -1
  159. data/frozen_old_spec/tags/1.8.7/core/symbol/downcase_spec.rb +0 -2
  160. data/frozen_old_spec/tags/1.8.7/core/symbol/element_reference_spec.rb +0 -4
  161. data/frozen_old_spec/tags/1.8.7/core/symbol/empty_spec.rb +0 -1
  162. data/frozen_old_spec/tags/1.8.7/core/symbol/match_spec.rb +0 -2
  163. data/frozen_old_spec/tags/1.8.7/core/symbol/swapcase_spec.rb +0 -2
  164. data/frozen_old_spec/tags/1.8.7/core/symbol/upcase_spec.rb +0 -1
  165. data/frozen_old_spec/tags/1.9.1/core/array/append_spec.rb +0 -1
  166. data/frozen_old_spec/tags/1.9.1/core/array/rotate_spec.rb +0 -1
  167. data/frozen_old_spec/tags/1.9.1/core/enumerable/all_spec.rb +0 -1
  168. data/frozen_old_spec/tags/1.9.1/core/enumerable/any_spec.rb +0 -2
  169. data/frozen_old_spec/tags/1.9.1/core/enumerable/none_spec.rb +0 -1
  170. data/frozen_old_spec/tags/1.9.1/core/enumerable/one_spec.rb +0 -1
  171. data/frozen_old_spec/tags/1.9.1/core/env/to_h_spec.rb +0 -2
  172. data/frozen_old_spec/tags/1.9.1/core/hash/default_proc_spec.rb +0 -1
  173. data/frozen_old_spec/tags/1.9.1/core/io/write_spec.rb +0 -2
  174. data/frozen_old_spec/tags/1.9.1/core/module/alias_method_spec.rb +0 -4
  175. data/frozen_old_spec/tags/1.9.1/core/module/attr_accessor_spec.rb +0 -2
  176. data/frozen_old_spec/tags/1.9.1/core/module/attr_reader_spec.rb +0 -2
  177. data/frozen_old_spec/tags/1.9.1/core/module/attr_spec.rb +0 -1
  178. data/frozen_old_spec/tags/1.9.1/core/module/attr_writer_spec.rb +0 -2
  179. data/frozen_old_spec/tags/1.9.1/core/module/define_method_spec.rb +0 -3
  180. data/frozen_old_spec/tags/1.9.1/core/module/remove_method_spec.rb +0 -1
  181. data/frozen_old_spec/tags/1.9.1/core/module/undef_method_spec.rb +0 -1
  182. data/frozen_old_spec/tags/1.9.1/core/nil/dup_spec.rb +0 -1
  183. data/frozen_old_spec/tags/1.9.2/core/array/append_spec.rb +0 -1
  184. data/frozen_old_spec/tags/1.9.2/core/enumerable/all_spec.rb +0 -1
  185. data/frozen_old_spec/tags/1.9.2/core/enumerable/any_spec.rb +0 -2
  186. data/frozen_old_spec/tags/1.9.2/core/enumerable/none_spec.rb +0 -1
  187. data/frozen_old_spec/tags/1.9.2/core/enumerable/one_spec.rb +0 -1
  188. data/frozen_old_spec/tags/1.9.2/core/io/write_spec.rb +0 -3
  189. data/frozen_old_spec/tags/1.9.2/core/module/alias_method_spec.rb +0 -4
  190. data/frozen_old_spec/tags/1.9.2/core/module/attr_accessor_spec.rb +0 -2
  191. data/frozen_old_spec/tags/1.9.2/core/module/attr_reader_spec.rb +0 -2
  192. data/frozen_old_spec/tags/1.9.2/core/module/attr_spec.rb +0 -1
  193. data/frozen_old_spec/tags/1.9.2/core/module/attr_writer_spec.rb +0 -2
  194. data/frozen_old_spec/tags/1.9.2/core/module/define_method_spec.rb +0 -3
  195. data/frozen_old_spec/tags/1.9.2/core/module/remove_method_spec.rb +0 -1
  196. data/frozen_old_spec/tags/1.9.2/core/module/undef_method_spec.rb +0 -1
  197. data/frozen_old_spec/tags/1.9.2/core/nil/dup_spec.rb +0 -1
  198. data/frozen_old_spec/tags/1.9.3/core/enumerable/any_spec.rb +0 -1
  199. data/frozen_old_spec/tags/1.9.3/core/module/alias_method_spec.rb +0 -4
  200. data/frozen_old_spec/tags/1.9.3/core/module/attr_accessor_spec.rb +0 -1
  201. data/frozen_old_spec/tags/1.9.3/core/module/attr_reader_spec.rb +0 -1
  202. data/frozen_old_spec/tags/1.9.3/core/module/attr_spec.rb +0 -1
  203. data/frozen_old_spec/tags/1.9.3/core/module/attr_writer_spec.rb +0 -1
  204. data/frozen_old_spec/tags/1.9.3/core/module/define_method_spec.rb +0 -3
  205. data/frozen_old_spec/tags/1.9.3/core/module/remove_method_spec.rb +0 -1
  206. data/frozen_old_spec/tags/1.9.3/core/module/undef_method_spec.rb +0 -1
  207. data/frozen_old_spec/tags/2.0.0/core/enumerable/any_spec.rb +0 -1
  208. data/frozen_old_spec/tags/2.0.0/core/module/alias_method_spec.rb +0 -1
  209. data/frozen_old_spec/tags/2.0.0/core/module/attr_accessor_spec.rb +0 -2
  210. data/frozen_old_spec/tags/2.0.0/core/module/attr_reader_spec.rb +0 -2
  211. data/frozen_old_spec/tags/2.0.0/core/module/attr_spec.rb +0 -1
  212. data/frozen_old_spec/tags/2.0.0/core/module/attr_writer_spec.rb +0 -2
  213. data/frozen_old_spec/tags/2.0.0/core/module/define_method_spec.rb +0 -2
  214. data/frozen_old_spec/tags/2.0.0/core/module/remove_method_spec.rb +0 -1
  215. data/frozen_old_spec/tags/2.0.0/core/module/undef_method_spec.rb +0 -1
  216. data/frozen_old_spec/tags/2.0.0/core/nil/dup_spec.rb +0 -1
  217. data/frozen_old_spec/tags/2.0.0/core/struct/new_spec.rb +0 -1
  218. data/frozen_old_spec/tags/2.1.0/core/enumerable/any_spec.rb +0 -1
  219. data/frozen_old_spec/tags/2.1.0/core/module/alias_method_spec.rb +0 -1
  220. data/frozen_old_spec/tags/2.1.0/core/module/attr_accessor_spec.rb +0 -2
  221. data/frozen_old_spec/tags/2.1.0/core/module/attr_reader_spec.rb +0 -2
  222. data/frozen_old_spec/tags/2.1.0/core/module/attr_spec.rb +0 -1
  223. data/frozen_old_spec/tags/2.1.0/core/module/attr_writer_spec.rb +0 -2
  224. data/frozen_old_spec/tags/2.1.0/core/module/define_method_spec.rb +0 -2
  225. data/frozen_old_spec/tags/2.1.0/core/module/remove_method_spec.rb +0 -1
  226. data/frozen_old_spec/tags/2.1.0/core/module/undef_method_spec.rb +0 -1
  227. data/frozen_old_spec/tags/2.1.0/core/nil/dup_spec.rb +0 -1
  228. data/frozen_old_spec/tags/2.1.0/core/struct/new_spec.rb +0 -1
  229. data/frozen_old_spec/tags/2.2.0/core/enumerable/any_spec.rb +0 -1
  230. data/frozen_old_spec/tags/2.2.0/core/module/alias_method_spec.rb +0 -1
  231. data/frozen_old_spec/tags/2.2.0/core/module/attr_accessor_spec.rb +0 -2
  232. data/frozen_old_spec/tags/2.2.0/core/module/attr_reader_spec.rb +0 -2
  233. data/frozen_old_spec/tags/2.2.0/core/module/attr_spec.rb +0 -1
  234. data/frozen_old_spec/tags/2.2.0/core/module/attr_writer_spec.rb +0 -2
  235. data/frozen_old_spec/tags/2.2.0/core/module/define_method_spec.rb +0 -1
  236. data/frozen_old_spec/tags/2.2.0/core/module/remove_method_spec.rb +0 -1
  237. data/frozen_old_spec/tags/2.2.0/core/module/undef_method_spec.rb +0 -1
  238. data/frozen_old_spec/tags/2.2.0/core/nil/dup_spec.rb +0 -1
  239. data/frozen_old_spec/tags/2.2.0/core/struct/new_spec.rb +0 -1
  240. data/frozen_old_spec/tags/2.3.0/core/enumerable/any_spec.rb +0 -1
  241. data/frozen_old_spec/tags/2.3.0/core/module/alias_method_spec.rb +0 -1
  242. data/frozen_old_spec/tags/2.3.0/core/module/attr_accessor_spec.rb +0 -2
  243. data/frozen_old_spec/tags/2.3.0/core/module/attr_reader_spec.rb +0 -2
  244. data/frozen_old_spec/tags/2.3.0/core/module/attr_spec.rb +0 -1
  245. data/frozen_old_spec/tags/2.3.0/core/module/attr_writer_spec.rb +0 -2
  246. data/frozen_old_spec/tags/2.3.0/core/module/define_method_spec.rb +0 -1
  247. data/frozen_old_spec/tags/2.3.0/core/module/remove_method_spec.rb +0 -1
  248. data/frozen_old_spec/tags/2.3.0/core/module/undef_method_spec.rb +0 -1
  249. data/frozen_old_spec/tags/2.3.0/core/nil/dup_spec.rb +0 -1
  250. data/frozen_old_spec/tags/2.3.0/core/struct/new_spec.rb +0 -1
  251. data/frozen_old_spec/tags/2.3.5/core/struct/new_spec.rb +0 -1
  252. data/frozen_old_spec/tags/2.4.0/core/enumerable/any_spec.rb +0 -1
  253. data/frozen_old_spec/tags/2.4.0/core/module/alias_method_spec.rb +0 -1
  254. data/frozen_old_spec/tags/2.4.0/core/module/attr_accessor_spec.rb +0 -2
  255. data/frozen_old_spec/tags/2.4.0/core/module/attr_reader_spec.rb +0 -2
  256. data/frozen_old_spec/tags/2.4.0/core/module/attr_spec.rb +0 -1
  257. data/frozen_old_spec/tags/2.4.0/core/module/attr_writer_spec.rb +0 -2
  258. data/frozen_old_spec/tags/2.4.0/core/module/define_method_spec.rb +0 -1
  259. data/frozen_old_spec/tags/2.4.0/core/module/remove_method_spec.rb +0 -1
  260. data/frozen_old_spec/tags/2.4.0/core/module/undef_method_spec.rb +0 -1
  261. data/frozen_old_spec/tags/2.4.0/core/nil/dup_spec.rb +0 -1
  262. data/frozen_old_spec/tags/2.4.0/core/struct/new_spec.rb +0 -1
  263. data/frozen_old_spec/tags/2.5.0/core/enumerable/any_spec.rb +0 -1
  264. data/frozen_old_spec/tags/2.5.0/core/module/alias_method_spec.rb +0 -1
  265. data/frozen_old_spec/tags/2.5.0/core/module/attr_accessor_spec.rb +0 -2
  266. data/frozen_old_spec/tags/2.5.0/core/module/attr_reader_spec.rb +0 -2
  267. data/frozen_old_spec/tags/2.5.0/core/module/attr_spec.rb +0 -1
  268. data/frozen_old_spec/tags/2.5.0/core/module/attr_writer_spec.rb +0 -2
  269. data/frozen_old_spec/tags/2.5.0/core/module/define_method_spec.rb +0 -1
  270. data/frozen_old_spec/tags/2.5.0/core/module/remove_method_spec.rb +0 -1
  271. data/frozen_old_spec/tags/2.5.0/core/module/undef_method_spec.rb +0 -1
  272. data/frozen_old_spec/tags/2.5.0/core/nil/dup_spec.rb +0 -1
  273. data/frozen_old_spec/tags/2.5.0/core/struct/new_spec.rb +0 -1
  274. data/set_version/1.8.7.rb +0 -1
  275. data/set_version/1.9.1.rb +0 -1
  276. data/set_version/1.9.2.rb +0 -1
  277. data/set_version/1.9.3.rb +0 -1
  278. data/set_version/2.0.0.rb +0 -1
  279. data/set_version/2.1.0.rb +0 -1
  280. data/set_version/2.2.0.rb +0 -1
  281. data/set_version/2.3.0.rb +0 -1
  282. data/set_version/2.4.0.rb +0 -1
  283. data/set_version/2.5.0.rb +0 -1
  284. data/set_version/2.6.0.rb +0 -1
  285. data/set_version/2.7.0.rb +0 -1
  286. data/set_version/setter.rb +0 -22
  287. data/spec/tags/1.8.7/core/array/to_h_spec.rb +0 -3
  288. data/spec/tags/1.8.7/core/enumerable/to_h_spec.rb +0 -2
  289. data/spec/tags/1.8.7/core/module/attr_spec.rb +0 -1
  290. data/spec/tags/1.8.7/core/module/include_spec.rb +0 -1
  291. data/spec/tags/1.9.1/core/array/bsearch_index_spec.rb +0 -1
  292. data/spec/tags/1.9.1/core/array/rotate_spec.rb +0 -1
  293. data/spec/tags/1.9.1/core/dir/each_child_spec.rb +0 -1
  294. data/spec/tags/1.9.1/core/env/to_h_spec.rb +0 -2
  295. data/spec/tags/1.9.1/core/hash/default_proc_spec.rb +0 -1
  296. data/spec/tags/1.9.1/core/hash/slice_spec.rb +0 -1
  297. data/spec/tags/1.9.1/core/hash/transform_keys_spec.rb +0 -2
  298. data/spec/tags/1.9.1/core/hash/transform_values_spec.rb +0 -2
  299. data/spec/tags/1.9.1/core/io/write_spec.rb +0 -3
  300. data/spec/tags/1.9.1/core/kernel/yield_self_spec.rb +0 -1
  301. data/spec/tags/1.9.1/core/method/curry_spec.rb +0 -1
  302. data/spec/tags/1.9.1/core/module/alias_method_spec.rb +0 -3
  303. data/spec/tags/1.9.1/core/module/attr_accessor_spec.rb +0 -1
  304. data/spec/tags/1.9.1/core/module/attr_reader_spec.rb +0 -1
  305. data/spec/tags/1.9.1/core/module/attr_spec.rb +0 -1
  306. data/spec/tags/1.9.1/core/module/attr_writer_spec.rb +0 -1
  307. data/spec/tags/1.9.1/core/module/define_method_spec.rb +0 -7
  308. data/spec/tags/1.9.1/core/string/uplus_spec.rb +0 -1
  309. data/spec/tags/1.9.1/core/struct/new_spec.rb +0 -2
  310. data/spec/tags/1.9.2/core/array/bsearch_index_spec.rb +0 -1
  311. data/spec/tags/1.9.2/core/array/to_h_spec.rb +0 -3
  312. data/spec/tags/1.9.2/core/dir/each_child_spec.rb +0 -1
  313. data/spec/tags/1.9.2/core/enumerable/to_h_spec.rb +0 -2
  314. data/spec/tags/1.9.2/core/hash/slice_spec.rb +0 -1
  315. data/spec/tags/1.9.2/core/hash/to_h_spec.rb +0 -3
  316. data/spec/tags/1.9.2/core/hash/transform_keys_spec.rb +0 -2
  317. data/spec/tags/1.9.2/core/hash/transform_values_spec.rb +0 -2
  318. data/spec/tags/1.9.2/core/io/write_spec.rb +0 -3
  319. data/spec/tags/1.9.2/core/kernel/then_spec.rb +0 -1
  320. data/spec/tags/1.9.2/core/kernel/yield_self_spec.rb +0 -1
  321. data/spec/tags/1.9.2/core/method/curry_spec.rb +0 -1
  322. data/spec/tags/1.9.2/core/module/alias_method_spec.rb +0 -3
  323. data/spec/tags/1.9.2/core/module/attr_accessor_spec.rb +0 -1
  324. data/spec/tags/1.9.2/core/module/attr_reader_spec.rb +0 -1
  325. data/spec/tags/1.9.2/core/module/attr_writer_spec.rb +0 -1
  326. data/spec/tags/1.9.2/core/module/define_method_spec.rb +0 -7
  327. data/spec/tags/1.9.2/core/module/include_spec.rb +0 -1
  328. data/spec/tags/1.9.2/core/string/uplus_spec.rb +0 -1
  329. data/spec/tags/1.9.2/core/struct/new_spec.rb +0 -2
  330. data/spec/tags/1.9.3/core/array/bsearch_index_spec.rb +0 -1
  331. data/spec/tags/1.9.3/core/array/to_h_spec.rb +0 -3
  332. data/spec/tags/1.9.3/core/dir/each_child_spec.rb +0 -1
  333. data/spec/tags/1.9.3/core/enumerable/grep_v_spec.rb +0 -2
  334. data/spec/tags/1.9.3/core/enumerable/to_h_spec.rb +0 -2
  335. data/spec/tags/1.9.3/core/enumerator/produce_spec.rb +0 -1
  336. data/spec/tags/1.9.3/core/hash/slice_spec.rb +0 -1
  337. data/spec/tags/1.9.3/core/hash/to_h_spec.rb +0 -3
  338. data/spec/tags/1.9.3/core/hash/transform_keys_spec.rb +0 -2
  339. data/spec/tags/1.9.3/core/hash/transform_values_spec.rb +0 -2
  340. data/spec/tags/1.9.3/core/io/write_spec.rb +0 -3
  341. data/spec/tags/1.9.3/core/kernel/then_spec.rb +0 -1
  342. data/spec/tags/1.9.3/core/kernel/yield_self_spec.rb +0 -1
  343. data/spec/tags/1.9.3/core/method/curry_spec.rb +0 -1
  344. data/spec/tags/1.9.3/core/module/alias_method_spec.rb +0 -3
  345. data/spec/tags/1.9.3/core/module/attr_accessor_spec.rb +0 -1
  346. data/spec/tags/1.9.3/core/module/attr_reader_spec.rb +0 -1
  347. data/spec/tags/1.9.3/core/module/attr_writer_spec.rb +0 -1
  348. data/spec/tags/1.9.3/core/module/define_method_spec.rb +0 -7
  349. data/spec/tags/1.9.3/core/module/include_spec.rb +0 -1
  350. data/spec/tags/1.9.3/core/string/uplus_spec.rb +0 -1
  351. data/spec/tags/1.9.3/core/struct/new_spec.rb +0 -2
  352. data/spec/tags/2.0.0/core/array/to_h_spec.rb +0 -3
  353. data/spec/tags/2.0.0/core/enumerable/grep_v_spec.rb +0 -2
  354. data/spec/tags/2.0.0/core/enumerable/to_h_spec.rb +0 -2
  355. data/spec/tags/2.0.0/core/hash/slice_spec.rb +0 -1
  356. data/spec/tags/2.0.0/core/hash/to_h_spec.rb +0 -3
  357. data/spec/tags/2.0.0/core/module/attr_accessor_spec.rb +0 -1
  358. data/spec/tags/2.0.0/core/module/attr_reader_spec.rb +0 -1
  359. data/spec/tags/2.0.0/core/module/attr_spec.rb +0 -1
  360. data/spec/tags/2.0.0/core/module/attr_writer_spec.rb +0 -1
  361. data/spec/tags/2.0.0/core/module/define_method_spec.rb +0 -5
  362. data/spec/tags/2.0.0/core/module/include_spec.rb +0 -1
  363. data/spec/tags/2.0.0/core/module/undef_method_spec.rb +0 -2
  364. data/spec/tags/2.0.0/core/string/uplus_spec.rb +0 -1
  365. data/spec/tags/2.0.0/core/struct/new_spec.rb +0 -3
  366. data/spec/tags/2.1.0/core/array/union_spec.rb +0 -1
  367. data/spec/tags/2.1.0/core/enumerable/grep_v_spec.rb +0 -2
  368. data/spec/tags/2.1.0/core/hash/slice_spec.rb +0 -1
  369. data/spec/tags/2.1.0/core/hash/to_h_spec.rb +0 -1
  370. data/spec/tags/2.1.0/core/module/attr_accessor_spec.rb +0 -1
  371. data/spec/tags/2.1.0/core/module/attr_reader_spec.rb +0 -1
  372. data/spec/tags/2.1.0/core/module/attr_spec.rb +0 -1
  373. data/spec/tags/2.1.0/core/module/attr_writer_spec.rb +0 -1
  374. data/spec/tags/2.1.0/core/module/define_method_spec.rb +0 -5
  375. data/spec/tags/2.1.0/core/module/undef_method_spec.rb +0 -2
  376. data/spec/tags/2.1.0/core/string/uplus_spec.rb +0 -1
  377. data/spec/tags/2.1.0/core/struct/new_spec.rb +0 -3
  378. data/spec/tags/2.2.0/core/enumerable/grep_v_spec.rb +0 -2
  379. data/spec/tags/2.2.0/core/hash/slice_spec.rb +0 -1
  380. data/spec/tags/2.2.0/core/hash/to_h_spec.rb +0 -1
  381. data/spec/tags/2.2.0/core/module/attr_accessor_spec.rb +0 -1
  382. data/spec/tags/2.2.0/core/module/attr_reader_spec.rb +0 -1
  383. data/spec/tags/2.2.0/core/module/attr_spec.rb +0 -1
  384. data/spec/tags/2.2.0/core/module/attr_writer_spec.rb +0 -1
  385. data/spec/tags/2.2.0/core/module/define_method_spec.rb +0 -5
  386. data/spec/tags/2.2.0/core/module/undef_method_spec.rb +0 -2
  387. data/spec/tags/2.2.0/core/string/uplus_spec.rb +0 -1
  388. data/spec/tags/2.2.0/core/struct/new_spec.rb +0 -3
  389. data/spec/tags/2.3.0/core/hash/slice_spec.rb +0 -1
  390. data/spec/tags/2.3.0/core/hash/to_h_spec.rb +0 -1
  391. data/spec/tags/2.3.0/core/module/attr_spec.rb +0 -1
  392. data/spec/tags/2.3.0/core/string/uplus_spec.rb +0 -1
  393. data/spec/tags/2.3.0/core/struct/new_spec.rb +0 -3
  394. data/spec/tags/2.4.0/core/hash/slice_spec.rb +0 -1
  395. data/spec/tags/2.4.0/core/hash/to_h_spec.rb +0 -1
  396. data/spec/tags/2.4.0/core/module/attr_spec.rb +0 -1
  397. data/spec/tags/2.4.0/core/struct/new_spec.rb +0 -1
  398. data/spec/tags/2.5.0/core/hash/to_h_spec.rb +0 -1
  399. data/test/README +0 -2
  400. data/test/_backport_guards_test.rb +0 -152
  401. data/test/bit_length_test.rb +0 -11
  402. data/test/lazy_test.rb +0 -487
  403. data/test/socket_interaction_test.rb +0 -9
  404. data/test/test_helper.rb +0 -1
data/README.md ADDED
@@ -0,0 +1,524 @@
1
+ # Backports Library [<img src="https://travis-ci.org/marcandre/backports.svg?branch=master">](https://travis-ci.org/marcandre/backports) [<img src="https://badge.fury.io/rb/backports.svg" alt="Gem Version" />](http://badge.fury.io/rb/backports)
2
+
3
+ Yearning to use some of the new cool features in Ruby 2.7 while using 2.3.x?
4
+ Have some legacy code in Ruby 1.8 but can't live without `flat_map`?
5
+
6
+ This gem is for you!
7
+
8
+ The goal of 'backports' is to make it easier to write ruby code that runs
9
+ across different versions of Ruby.
10
+
11
+ Note: [Next major version (X-mas
12
+ 2020)](https://github.com/marcandre/backports/issues/139) will drop support
13
+ for Ruby < 2.2.
14
+
15
+ ## Loading backports
16
+
17
+ ### Explicitly (recommended)
18
+
19
+ For example, if you want to use transform_values and transform_keys, even in
20
+ Ruby implementations that don't include it:
21
+
22
+ require 'backports/2.4.0/hash/transform_values'
23
+ require 'backports/2.5.0/hash/transform_keys'
24
+
25
+ This will enable Hash#transform_values and Hash#transform_keys, using the
26
+ native versions if available or otherwise provide a pure Ruby version.
27
+
28
+ ### By Module
29
+
30
+ To bring all the backports for a given Class/Module, you can specify only that
31
+ Class:
32
+
33
+ require 'backports/2.3.0/hash'
34
+
35
+ This will make sure that Hash responds to dig, fetch_values, <, <=, >, >= and
36
+ to_proc
37
+
38
+ ### Up to a specific Ruby version (deprecated)
39
+
40
+ Although this is deprecated, you can load all backports up to a specific version.
41
+ For example, to bring any
42
+ version of Ruby mostly up to Ruby 2.4.0's standards:
43
+
44
+ require 'backports/2.4.0'
45
+
46
+ This will bring in all the features of 1.8.7 and many features of Ruby 1.9.x
47
+ all the way up to Ruby 2.4.0 (for all versions of Ruby)!
48
+
49
+ While it is not recommended, you may `require 'backports/latest'` as a
50
+ shortcut to the latest Ruby version supported. This is equivalent to the
51
+ deprecated `require 'backports'`.
52
+
53
+ *Note*: Although I am a Ruby committer, this gem is a personal project and is
54
+ not endorsed by ruby-core.
55
+
56
+ ## What's inside
57
+
58
+ Goals for backported features:
59
+ 1. Won't break older code
60
+ 2. Pure Ruby (no C extensions)
61
+ 3. Pass [ruby/spec](https://github.com/ruby/spec)
62
+
63
+ Let's be a bit more precise about the "breaking code" business. It is of
64
+ course entirely possible that code will break. In particular, you may be
65
+ distinguishing parameters with duck typing, but a builtin class may, in the
66
+ future, be responding to a particular call. Here's {an exemple from
67
+ Rails}(https://github.com/rails/rails/blob/a4b55827721a5967299f3c1531afb3d6d81
68
+ e4ac0/activerecord/lib/active_record/associations/association.rb#L155-L159)
69
+ that is relying on the fact that Proc and Method respond to :to_proc and Hash
70
+ isn't. That is, until Ruby 2.3... This old version of Rails therefore won't
71
+ work on Ruby 2.3, or on older Rubies with that the `2.3.0/hash/to_proc`
72
+ loaded...
73
+
74
+ For Ruby < 2.0, there are some real incompatibilities. For example,
75
+ `Module::instance_methods` which returns strings in 1.8 and symbols in 1.9. No
76
+ change can be made without the risk of breaking existing code. Such
77
+ incompatibilities are left unchanged, although you can require some of these
78
+ changes in addition (see below).
79
+
80
+ ## Installation & compatibility
81
+
82
+ `backports` can be installed with:
83
+
84
+ gem install backports
85
+
86
+ To use:
87
+
88
+ require 'rubygems'
89
+ # For only specific backports:
90
+ require 'backports/1.9.1/kernel/require_relative'
91
+ require 'backports/2.0.0/enumerable/lazy'
92
+
93
+ # For all backports up to a given version
94
+ require 'backports/1.9.2' # All backports for Ruby 1.9.2 and below
95
+
96
+ Note: about a dozen of backports have a dependency that will be also loaded.
97
+ For example, the backport of Enumerable#flat_map uses flatten(1), so if
98
+ required from Ruby 1.8.6 (where Array#flatten does not accept an argument),
99
+ the backport for Ruby's 1.8.7 flatten with an argument will also be loaded.
100
+
101
+ With bundler, add to your Gemfile:
102
+
103
+ gem 'backports', :require => false
104
+
105
+ Run `bundle install` and require the desired backports. Compatible with Ruby
106
+ itself, JRuby and Rubinius.
107
+
108
+ # Complete List of backports
109
+
110
+ ## Ruby 2.7 backports
111
+
112
+ * Array
113
+ * `intersection`
114
+
115
+ * Comparable
116
+ * `clamp` (with range)
117
+
118
+ * Complex
119
+ * +<=>+
120
+
121
+ * Enumerable
122
+ * `filter_map`
123
+ * `tally`
124
+
125
+ * Enumerator
126
+ * `produce` (class method)
127
+
128
+ * Time
129
+ * `floor`, `ceil`
130
+
131
+ ## Ruby 2.6 backports
132
+
133
+ * Array
134
+ * `difference`, `union`
135
+ * `to_h` (with block)
136
+
137
+ * Enumerable
138
+ * `chain`
139
+ * `to_h` (with block)
140
+
141
+ * Enumerator::Chain (use Enumerable#chain)
142
+
143
+ * Hash
144
+ * `merge`, `merge!`/`update` (with multiple arguments)
145
+ * `to_h` (with block)
146
+
147
+ * Kernel
148
+ * `then`
149
+
150
+ * Method
151
+ * +<<+, +>>+
152
+
153
+ * Proc
154
+ * +<<+, +>>+
155
+
156
+ ## Ruby 2.5 backports
157
+
158
+ * Array
159
+ * `append`, `prepend`
160
+
161
+ * Dir
162
+ * `children`, `each_child`
163
+
164
+ * Enumerable
165
+ * `any?`, `all?`, `none?`, `one?` (with pattern argument)
166
+
167
+ * Hash
168
+ * `slice`
169
+ * `transform_keys`
170
+
171
+ * Integer
172
+ * `sqrt`
173
+ * `allbits?`, `anybits?` and `nobits?`
174
+
175
+ * Kernel
176
+ * `yield_self`
177
+
178
+ * Module
179
+ * `attr`, `attr_accessor`, `attr_reader`, `attr_writer` (now public)
180
+ * `define_method`, `alias_method`, `undef_method`, `remove_method` (now
181
+ public)
182
+
183
+ * String
184
+ * `delete_prefix`, `delete_prefix!`
185
+ * `delete_suffix`, `delete_suffix!`
186
+ * `undump`
187
+
188
+ * Struct
189
+ * `new` (with `keyword_init: true`)
190
+
191
+ ## Ruby 2.4 backports
192
+
193
+ * Comparable
194
+ * `clamp`
195
+
196
+ * Enumerable
197
+ * `sum`
198
+ * `uniq`
199
+
200
+ * Hash
201
+ * `compact`, `compact!`
202
+ * `transform_values`, `transform_values!`
203
+
204
+ * Regexp
205
+ * `match?`
206
+
207
+ * String
208
+ * `match?`
209
+
210
+ * FalseClass, Fixnum, Float, NilClass, TrueClass
211
+ * `dup`
212
+
213
+ ## Ruby 2.3 backports
214
+
215
+ * Array
216
+ * `bsearch_index`
217
+ * `dig`
218
+
219
+ * Enumerable
220
+ * `chunk_while`
221
+ * `grep_v`
222
+
223
+ * Hash
224
+ * `dig`
225
+ * `fetch_values`
226
+ * `to_proc`
227
+ * <=, <, >=, >
228
+
229
+ * Numeric
230
+ * `negative?`
231
+ * `positive?`
232
+
233
+ * String
234
+ * unary + and -
235
+
236
+ * Struct
237
+ * `dig`
238
+
239
+ ## Ruby 2.2 backports
240
+
241
+ * Enumerable
242
+ * `slice_after`
243
+ * `slice_when`
244
+
245
+ * Float
246
+ * `prev_float`
247
+ * `next_float`
248
+
249
+ * Kernel
250
+ * `itself`
251
+
252
+ * Method
253
+ * `curry`
254
+ * `super_method`
255
+
256
+ * String
257
+ * `unicode_normalize`
258
+ * `unicode_normalize!`
259
+ * `unicode_normalize?`
260
+
261
+ ## Ruby 2.1 backports
262
+
263
+ * Array
264
+ * `to_h`
265
+
266
+ * Bignum
267
+ * `bit_length`
268
+
269
+ * Enumerable
270
+ * `to_h`
271
+
272
+ * Fixnum
273
+ * `bit_length`
274
+
275
+ * Module
276
+ * `include` (now public)
277
+
278
+ ## Ruby 2.0 backports
279
+
280
+ * Array
281
+ * `bsearch`
282
+
283
+ * Enumerable
284
+ * `lazy`
285
+
286
+ * Enumerator::Lazy
287
+ * all methods
288
+
289
+ * Hash
290
+ * `default_proc=` (with nil argument)
291
+ * `to_h`
292
+
293
+ * `nil.to_h`
294
+
295
+ * Range
296
+ * `bsearch`
297
+
298
+ * Struct
299
+ * `to_h`
300
+
301
+ ## Ruby 1.9.3 backports
302
+
303
+ * File
304
+ * `NULL`
305
+
306
+ * IO
307
+ * `advise` (acts as a noop)
308
+ * `write`, `binwrite`
309
+
310
+ * String
311
+ * `byteslice`
312
+ * `prepend`
313
+
314
+ ## Ruby 1.9.2 backports
315
+
316
+ * Array
317
+ * `rotate, rotate!`
318
+ * `keep_if, select!`
319
+ * `product` (with block)
320
+ * `repeated_combination`, `repeated_permutation`
321
+ * `sort_by!`
322
+ * `uniq, uniq!` (with block)
323
+
324
+ * Complex
325
+ * `to_r`
326
+
327
+ * Dir
328
+ * `home`
329
+
330
+ * Enumerable
331
+ * `chunk`
332
+ * `flat_map`, `collect_concat`
333
+ * `join`
334
+ * `slice_before`
335
+
336
+ * Float::INFINITY, NAN
337
+
338
+ * Hash
339
+ * `keep_if`, `select!`
340
+
341
+ * Object
342
+ * `singleton_class`
343
+
344
+ * Random (new class)
345
+
346
+ *Note*: The methods of `Random` can't be required individually; the class
347
+ can only be required whole with `require 'backports/1.9.2/random'`.
348
+
349
+ ## Ruby 1.9.1 backports
350
+
351
+ Additionally, the following Ruby 1.9 features have been backported:
352
+ * Array
353
+ * `try_convert`
354
+ * `sample`
355
+
356
+ * Enumerable
357
+ * `each_with_object`
358
+ * `each_with_index` (with arguments)
359
+
360
+ * Enumerator
361
+ * `new` (with block)
362
+
363
+ * File
364
+ * `binread`
365
+ * `to_path`
366
+ * All class methods accepting filenames will accept files or anything
367
+ with a `#to_path` method.
368
+ * `File.open` accepts an options hash.
369
+
370
+ * Float
371
+ * `round`
372
+
373
+ * Hash
374
+ * `assoc`, `rassoc`
375
+ * `key`
376
+ * `try_convert`
377
+ * `default_proc=`
378
+
379
+ * Integer
380
+ * `magnitude`
381
+ * `round`
382
+
383
+ * IO
384
+ * `bin_read`
385
+ * `try_convert`
386
+ * `ungetbyte`
387
+ * `IO.open` accepts an options hash.
388
+
389
+ * Kernel
390
+ * `require_relative`
391
+
392
+ * Math
393
+ * `log` (with base)
394
+ * `log2`
395
+
396
+ * Numeric
397
+ * `round`
398
+
399
+ * Object
400
+ * `define_singleton_method`
401
+ * `public_method`
402
+ * `public_send`
403
+
404
+ * Proc
405
+ * `yield`
406
+ * `lambda?`
407
+ * `curry`
408
+ * `===`
409
+
410
+ * Range
411
+ * `cover?`
412
+
413
+ * Regexp
414
+ * `try_convert`
415
+
416
+ * String
417
+ * `ascii_only?`
418
+ * `chr`
419
+ * `clear`
420
+ * `codepoints`, `each_codepoint`
421
+ * `get_byte`, `set_byte`
422
+ * `ord`
423
+ * `try_convert`
424
+
425
+ `Enumerator` can be accessed directly (instead of `Enumerable::Enumerator`)
426
+
427
+ To include *only* these backports and those of the 1.8 line, `require
428
+ "backports/1.9.1"`.
429
+
430
+ Moreover, a pretty good imitation of `BasicObject` is available, but since it
431
+ is only an imitation, it must be required explicitly:
432
+
433
+ require 'backports/basic_object'
434
+
435
+ ## Ruby 1.8.7
436
+
437
+ Complete Ruby 1.8.7 backporting (core language). Refer to the official list of
438
+ [changes](https://github.com/ruby/ruby/blob/ruby_1_8_7/NEWS). That's about 130
439
+ backports!
440
+
441
+ Only exceptions:
442
+ * String#gsub (the form returning an enumerator)
443
+ * GC.stress= (not implemented)
444
+ * Array#choice (removed in 1.9, use 1.9.1's Array#sample instead)
445
+
446
+ ## Libraries
447
+
448
+ Libraries were slowly being backported, but they are now available as separate gems.
449
+
450
+ The backports would be automatically used after requiring 'backports/std_lib' but this is now deprecated and discouraged.
451
+
452
+ The following libraries are up to date with Ruby 1.9.3:
453
+
454
+ * Matrix
455
+ * Prime
456
+ * Set
457
+
458
+ The following library is to date with Ruby 2.0.0:
459
+
460
+ * OpenStruct (ostruct)
461
+
462
+ I am aware of the following backport gem, which probably won't make it into
463
+ this gem:
464
+
465
+ * Net::SMTP for Ruby 1.8.6:
466
+ [smtp_tls](http://seattlerb.rubyforge.org/smtp_tls/)
467
+
468
+ Requiring backports for a given version of Ruby will also load
469
+ 'backports/std_lib'.
470
+
471
+ ## Forcing incompatibilities
472
+
473
+ Some backports would create incompatibilities in their current Ruby version
474
+ but could be useful in some projects. It is possible to request such
475
+ incompatible changes. Backports currently supports the following:
476
+
477
+ * Hash
478
+ * `select` (returns a Hash instead of an Array)
479
+
480
+ * Enumerable / Array
481
+ * `map` (returns an enumerator when called without a block)
482
+
483
+ * String
484
+ * `length`, `size` (for UTF-8 support)
485
+
486
+ These must be imported in addition to the backports gem, for example:
487
+
488
+ require "backports/force/hash_select"
489
+ {}.select{} # => {}, even in Ruby 1.8
490
+
491
+ ## Thanks
492
+
493
+ Thanks for the bug reports and patches, in particular the repeat offenders:
494
+
495
+ * Arto Bendiken ( [bendiken](http://github.com/bendiken) )
496
+ * Konstantin Haase ( [rkh](https://github.com/rkh) )
497
+ * Roger Pack ( [rdp](http://github.com/rdp) )
498
+ * Victor Shepelev ( [zverok](http://github.com/zverok) )
499
+
500
+ ## Contributing
501
+
502
+ The best way to submit a patch is to also submit a patch to
503
+ [ruby/spec](https://github.com/ruby/spec) and then a patch to backports that
504
+ make it pass the spec.
505
+
506
+ See below to test rubyspec. Note that only features missing from your Ruby
507
+ version are tested.
508
+
509
+ git submodule init && git submodule update # => pulls rubyspecs
510
+ bundle install
511
+ bundle exec rake spec[hash/slice] # => tests Hash#slice (must be in Ruby 2.4 or less)
512
+ bundle exec rake spec[hash/*] # => tests all backported Hash methods
513
+ bundle exec rake spec (or rake spec[*/*]) # => all rubyspecs for backported methods
514
+
515
+ Failures that are acceptable are added the to `tags` file.
516
+
517
+ # License
518
+
519
+ `backports` is released under the terms of the MIT License, see the included
520
+ LICENSE file.
521
+
522
+ Author
523
+ : Marc-André Lafortune
524
+