backports 3.16.1 → 3.18.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -2
  3. data/Gemfile +6 -13
  4. data/README.md +256 -251
  5. data/SECURITY.md +5 -0
  6. data/backports.gemspec +1 -1
  7. data/lib/backports.rb +6 -0
  8. data/lib/backports/1.8.7.rb +7 -6
  9. data/lib/backports/1.9.1.rb +6 -1
  10. data/lib/backports/1.9.2.rb +6 -1
  11. data/lib/backports/1.9.3.rb +6 -1
  12. data/lib/backports/2.0.0.rb +6 -1
  13. data/lib/backports/2.0.0/range/size.rb +2 -0
  14. data/lib/backports/2.1.0.rb +1 -1
  15. data/lib/backports/2.2.0.rb +1 -1
  16. data/lib/backports/2.2.0/enumerable/slice_after.rb +1 -1
  17. data/lib/backports/2.2.0/float/next_float.rb +1 -1
  18. data/lib/backports/2.2.0/float/prev_float.rb +1 -1
  19. data/lib/backports/2.2.0/method/super_method.rb +2 -2
  20. data/lib/backports/2.3.0.rb +1 -1
  21. data/lib/backports/2.3.0/array/bsearch_index.rb +1 -1
  22. data/lib/backports/2.3.0/hash/lt.rb +1 -1
  23. data/lib/backports/2.3.0/hash/lte.rb +1 -1
  24. data/lib/backports/2.3.0/hash/to_proc.rb +1 -1
  25. data/lib/backports/2.3.0/struct/dig.rb +1 -2
  26. data/lib/backports/2.4.0.rb +1 -1
  27. data/lib/backports/2.4.0/hash/transform_values.rb +2 -2
  28. data/lib/backports/2.4.0/true_class/dup.rb +0 -1
  29. data/lib/backports/2.5.0.rb +1 -1
  30. data/lib/backports/2.5.0/hash/transform_keys.rb +1 -1
  31. data/lib/backports/2.5.0/integer/sqrt.rb +2 -2
  32. data/lib/backports/2.5.0/module/alias_method.rb +0 -1
  33. data/lib/backports/2.5.0/string/undump.rb +3 -7
  34. data/lib/backports/2.5.0/struct/new.rb +1 -1
  35. data/lib/backports/2.6.0.rb +1 -1
  36. data/lib/backports/2.6.0/enumerable/chain.rb +4 -1
  37. data/lib/backports/2.6.0/hash/to_h.rb +1 -1
  38. data/lib/backports/2.6.0/range.rb +3 -0
  39. data/lib/backports/2.6.0/range/cover.rb +22 -0
  40. data/lib/backports/2.7.0.rb +1 -1
  41. data/lib/backports/2.7.0/enumerable/filter_map.rb +2 -2
  42. data/lib/backports/tools/deprecation.rb +13 -6
  43. data/lib/backports/tools/require_relative_dir.rb +6 -1
  44. data/lib/backports/version.rb +1 -1
  45. metadata +7 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2118947fbadf4aa13865b5ceec7be5ed416ab4ada72647c076bcc277c034abfc
4
- data.tar.gz: c6237a756a22de924ef77c9b0027a55d55a9c2386286ef2ba86c8967b75cb2e3
3
+ metadata.gz: b1f8274a378c35a932287714e49499fdfe0f6b1cc0c3b10f77b3e0b321d05e80
4
+ data.tar.gz: 47596230657db9f20c4ccc221ac4e0d629bd8e0798ddadc6c94c096f3a3bd89f
5
5
  SHA512:
6
- metadata.gz: 324ce7e19fabc56f101dcf2b567f1b3e2b75b7d165351a6b8526df050d8646a13a3645b5aa747e51ded19f9e486adea6b9612f31798a5660135ededc837f2888
7
- data.tar.gz: 6455e9141e9a2fb66a68be72184caedc36529027459590d35be9ebc462967424ed6cb736b2fd836b2f998e616985e473c895d27f56fafd55c4ee13f838e761ec
6
+ metadata.gz: 6be9e6cde88338a14523a28bae4c2818f976aa81963001ec8370c137e0ca0d8e289049d76670f2d76b8619a4b27956b8e72a6bc186ba688095a6707a9ff804bf
7
+ data.tar.gz: 252030972b159d5380cd6a8b65807451cfdfbdaab179c2460ec07c150ec4de45db6c8d0f2fb36c1dd1caee078345514b71547564a9cc776ea84a0719e6767aa0
@@ -6,13 +6,46 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- Note: [Next major version (X-mas 2020)](https://github.com/marcandre/backports/issues/139) will drop support for Ruby < 2.2.
9
+ Note: [Next major version (X-mas 2020)](https://github.com/marcandre/backports/issues/139) might drop support for Ruby < 2.2, please comment.
10
+
11
+ ## [3.18.0](https://github.com/marcandre/backports/compare/v3.17.2...v3.18.0) - 2020-06-22
12
+
13
+ ### Changed
14
+
15
+ Require per ruby version / all requires now check `RUBY_VERSION` to be more efficient [#149]
16
+
17
+ ## [3.17.2](https://github.com/marcandre/backports/compare/v3.17.1...v3.17.2) - 2020-04-09
18
+
19
+ ### Fixed
20
+
21
+ Fix Range#cover (Ruby 2.6.0) [#148]
22
+
23
+ ## [3.17.1](https://github.com/marcandre/backports/compare/v3.17.0...v3.17.1) - 2020-04-09
24
+
25
+ ### Fixed
26
+
27
+ Fix Range#size (Ruby 2.0) on Ruby 1.8.7 [#144]
28
+
29
+ ## [3.17.0](https://github.com/marcandre/backports/compare/v3.16.2...v3.17.0) - 2020-03-06
30
+
31
+ ### Added
32
+
33
+ * Ruby 2.6 backports
34
+
35
+ * Range
36
+ * `cover?` (with `Range` argument)
37
+
38
+ ### Changed
39
+
40
+ Requiring features for a particular version of Ruby or `latest` is un-deprecated but
41
+ instead simply warned in verbose mode.
10
42
 
11
43
  ## [3.16.1](https://github.com/marcandre/backports/compare/v3.16.0...v3.16.1) - 2020-02-16
12
44
 
13
45
  ### Deprecated
14
46
 
15
- Officially deprecate requiring features for a particular version of Ruby, `latest`, `std_lib` or `rails` backports
47
+ Officially deprecate requiring features for a particular version of Ruby, `latest`, `std_lib` or `rails` backports.
48
+ Partly un-deprecated in 3.17.0!
16
49
 
17
50
  ### Fixed
18
51
 
data/Gemfile CHANGED
@@ -1,23 +1,16 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- # Declare your gem's dependencies in backports.gemspec.
4
- # Bundler will treat runtime dependencies like base dependencies, and
5
- # development dependencies will be added by default to the :development group.
6
3
  gemspec
7
4
 
8
- # jquery-rails is used by the dummy application
9
5
  group :test do
10
6
  gem "rake"
11
7
  gem 'mspec'
12
8
  gem 'activesupport', '~>3.2.0'
13
- gem 'minitest', '< 5.0.0', :require => false
14
- gem 'test-unit', '~>2.1.1.0'
9
+ gem 'test-unit'
15
10
  end
16
11
 
17
- # Declare any dependencies that are still in development here instead of in
18
- # your gemspec. These might include edge Rails or gems from your path or
19
- # Git. Remember to move these dependencies to your gemspec before releasing
20
- # your gem to rubygems.org.
21
-
22
- # To use debugger
23
- # gem 'ruby-debug19', :require => 'ruby-debug'
12
+ if RUBY_VERSION >= '2.3.0'
13
+ group :development do
14
+ gem 'rubocop', '~> 0.80.0'
15
+ end
16
+ end
data/README.md CHANGED
@@ -1,4 +1,4 @@
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)
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) [![Tidelift](https://tidelift.com/badges/package/rubygems/backports)](https://tidelift.com/subscription/pkg/rubygems-backports?utm_source=rubygems-backports&utm_medium=referral&utm_campaign=readme)
2
2
 
3
3
  Yearning to use some of the new cool features in Ruby 2.7 while using 2.3.x?
4
4
  Have some legacy code in Ruby 1.8 but can't live without `flat_map`?
@@ -35,20 +35,22 @@ Class:
35
35
  This will make sure that Hash responds to dig, fetch_values, <, <=, >, >= and
36
36
  to_proc
37
37
 
38
- ### Up to a specific Ruby version (deprecated)
38
+ ### Up to a specific Ruby version (for quick coding)
39
39
 
40
- Although this is deprecated, you can load all backports up to a specific version.
40
+ You can load all backports up to a specific version.
41
41
  For example, to bring any
42
- version of Ruby mostly up to Ruby 2.4.0's standards:
42
+ version of Ruby mostly up to Ruby 2.7.0's standards:
43
43
 
44
- require 'backports/2.4.0'
44
+ require 'backports/2.7.0'
45
45
 
46
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)!
47
+ all the way up to Ruby 2.7.0 (for all versions of Ruby)!
48
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'`.
49
+ You may `require 'backports/latest'` as a
50
+ shortcut to the latest Ruby version supported.
51
+
52
+ *Note*: For production / public gems, it is highly recommended you only require
53
+ the backports you need explicitly.
52
54
 
53
55
  *Note*: Although I am a Ruby committer, this gem is a personal project and is
54
56
  not endorsed by ruby-core.
@@ -63,14 +65,14 @@ Goals for backported features:
63
65
  Let's be a bit more precise about the "breaking code" business. It is of
64
66
  course entirely possible that code will break. In particular, you may be
65
67
  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)
68
+ future, be responding to a particular call. Here's [an example from Rails][]
69
69
  that is relying on the fact that Proc and Method respond to :to_proc and Hash
70
70
  isn't. That is, until Ruby 2.3... This old version of Rails therefore won't
71
71
  work on Ruby 2.3, or on older Rubies with that the `2.3.0/hash/to_proc`
72
72
  loaded...
73
73
 
74
+ [an example from rails]: https://github.com/rails/rails/blob/a4b55827721a5967299f3c1531afb3d6d81e4ac0/activerecord/lib/active_record/associations/association.rb#L155-L159
75
+
74
76
  For Ruby < 2.0, there are some real incompatibilities. For example,
75
77
  `Module::instance_methods` which returns strings in 1.8 and symbols in 1.9. No
76
78
  change can be made without the risk of breaking existing code. Such
@@ -109,239 +111,242 @@ itself, JRuby and Rubinius.
109
111
 
110
112
  ## Ruby 2.7 backports
111
113
 
112
- * Array
113
- * `intersection`
114
+ #### Array
115
+ - `intersection`
114
116
 
115
- * Comparable
116
- * `clamp` (with range)
117
+ #### Comparable
118
+ - `clamp` (with range)
117
119
 
118
- * Complex
119
- * +<=>+
120
+ #### Complex
121
+ - +<=>+
120
122
 
121
- * Enumerable
122
- * `filter_map`
123
- * `tally`
123
+ #### Enumerable
124
+ - `filter_map`
125
+ - `tally`
124
126
 
125
- * Enumerator
126
- * `produce` (class method)
127
+ #### Enumerator
128
+ - `produce` (class method)
127
129
 
128
- * Time
129
- * `floor`, `ceil`
130
+ #### Time
131
+ - `floor`, `ceil`
130
132
 
131
133
  ## Ruby 2.6 backports
132
134
 
133
- * Array
134
- * `difference`, `union`
135
- * `to_h` (with block)
135
+ #### Array
136
+ - `difference`, `union`
137
+ - `to_h` (with block)
138
+
139
+ #### Enumerable
140
+ - `chain`
141
+ - `to_h` (with block)
136
142
 
137
- * Enumerable
138
- * `chain`
139
- * `to_h` (with block)
143
+ #### Enumerator::Chain (use Enumerable#chain)
140
144
 
141
- * Enumerator::Chain (use Enumerable#chain)
145
+ #### Hash
146
+ - `merge`, `merge!`/`update` (with multiple arguments)
147
+ - `to_h` (with block)
142
148
 
143
- * Hash
144
- * `merge`, `merge!`/`update` (with multiple arguments)
145
- * `to_h` (with block)
149
+ #### Kernel
150
+ - `then`
146
151
 
147
- * Kernel
148
- * `then`
152
+ #### Method
153
+ - +<<+, +>>+
149
154
 
150
- * Method
151
- * +<<+, +>>+
155
+ #### Proc
156
+ - +<<+, +>>+
152
157
 
153
- * Proc
154
- * +<<+, +>>+
158
+ #### Range
159
+ - `cover?` (with `Range` argument)
155
160
 
156
161
  ## Ruby 2.5 backports
157
162
 
158
- * Array
159
- * `append`, `prepend`
163
+ #### Array
164
+ - `append`, `prepend`
160
165
 
161
- * Dir
162
- * `children`, `each_child`
166
+ #### Dir
167
+ - `children`, `each_child`
163
168
 
164
- * Enumerable
165
- * `any?`, `all?`, `none?`, `one?` (with pattern argument)
169
+ #### Enumerable
170
+ - `any?`, `all?`, `none?`, `one?` (with pattern argument)
166
171
 
167
- * Hash
168
- * `slice`
169
- * `transform_keys`
172
+ #### Hash
173
+ - `slice`
174
+ - `transform_keys`
170
175
 
171
- * Integer
172
- * `sqrt`
173
- * `allbits?`, `anybits?` and `nobits?`
176
+ #### Integer
177
+ - `sqrt`
178
+ - `allbits?`, `anybits?` and `nobits?`
174
179
 
175
- * Kernel
176
- * `yield_self`
180
+ #### Kernel
181
+ - `yield_self`
177
182
 
178
- * Module
179
- * `attr`, `attr_accessor`, `attr_reader`, `attr_writer` (now public)
180
- * `define_method`, `alias_method`, `undef_method`, `remove_method` (now
183
+ #### Module
184
+ - `attr`, `attr_accessor`, `attr_reader`, `attr_writer` (now public)
185
+ - `define_method`, `alias_method`, `undef_method`, `remove_method` (now
181
186
  public)
182
187
 
183
- * String
184
- * `delete_prefix`, `delete_prefix!`
185
- * `delete_suffix`, `delete_suffix!`
186
- * `undump`
188
+ #### String
189
+ - `delete_prefix`, `delete_prefix!`
190
+ - `delete_suffix`, `delete_suffix!`
191
+ - `undump`
187
192
 
188
- * Struct
189
- * `new` (with `keyword_init: true`)
193
+ #### Struct
194
+ - `new` (with `keyword_init: true`)
190
195
 
191
196
  ## Ruby 2.4 backports
192
197
 
193
- * Comparable
194
- * `clamp`
198
+ #### Comparable
199
+ - `clamp`
195
200
 
196
- * Enumerable
197
- * `sum`
198
- * `uniq`
201
+ #### Enumerable
202
+ - `sum`
203
+ - `uniq`
199
204
 
200
- * Hash
201
- * `compact`, `compact!`
202
- * `transform_values`, `transform_values!`
205
+ #### Hash
206
+ - `compact`, `compact!`
207
+ - `transform_values`, `transform_values!`
203
208
 
204
- * Regexp
205
- * `match?`
209
+ #### Regexp
210
+ - `match?`
206
211
 
207
- * String
208
- * `match?`
212
+ #### String
213
+ - `match?`
209
214
 
210
- * FalseClass, Fixnum, Float, NilClass, TrueClass
211
- * `dup`
215
+ #### FalseClass, Fixnum, Float, NilClass, TrueClass
216
+ - `dup`
212
217
 
213
218
  ## Ruby 2.3 backports
214
219
 
215
- * Array
216
- * `bsearch_index`
217
- * `dig`
220
+ #### Array
221
+ - `bsearch_index`
222
+ - `dig`
218
223
 
219
- * Enumerable
220
- * `chunk_while`
221
- * `grep_v`
224
+ #### Enumerable
225
+ - `chunk_while`
226
+ - `grep_v`
222
227
 
223
- * Hash
224
- * `dig`
225
- * `fetch_values`
226
- * `to_proc`
227
- * <=, <, >=, >
228
+ #### Hash
229
+ - `dig`
230
+ - `fetch_values`
231
+ - `to_proc`
232
+ - <=, <, >=, >
228
233
 
229
- * Numeric
230
- * `negative?`
231
- * `positive?`
234
+ #### Numeric
235
+ - `negative?`
236
+ - `positive?`
232
237
 
233
- * String
234
- * unary + and -
238
+ #### String
239
+ - unary + and -
235
240
 
236
- * Struct
237
- * `dig`
241
+ #### Struct
242
+ - `dig`
238
243
 
239
244
  ## Ruby 2.2 backports
240
245
 
241
- * Enumerable
242
- * `slice_after`
243
- * `slice_when`
246
+ #### Enumerable
247
+ - `slice_after`
248
+ - `slice_when`
244
249
 
245
- * Float
246
- * `prev_float`
247
- * `next_float`
250
+ #### Float
251
+ - `prev_float`
252
+ - `next_float`
248
253
 
249
- * Kernel
250
- * `itself`
254
+ #### Kernel
255
+ - `itself`
251
256
 
252
- * Method
253
- * `curry`
254
- * `super_method`
257
+ #### Method
258
+ - `curry`
259
+ - `super_method`
255
260
 
256
- * String
257
- * `unicode_normalize`
258
- * `unicode_normalize!`
259
- * `unicode_normalize?`
261
+ #### String
262
+ - `unicode_normalize`
263
+ - `unicode_normalize!`
264
+ - `unicode_normalize?`
260
265
 
261
266
  ## Ruby 2.1 backports
262
267
 
263
- * Array
264
- * `to_h`
268
+ #### Array
269
+ - `to_h`
265
270
 
266
- * Bignum
267
- * `bit_length`
271
+ #### Bignum
272
+ - `bit_length`
268
273
 
269
- * Enumerable
270
- * `to_h`
274
+ #### Enumerable
275
+ - `to_h`
271
276
 
272
- * Fixnum
273
- * `bit_length`
277
+ #### Fixnum
278
+ - `bit_length`
274
279
 
275
- * Module
276
- * `include` (now public)
280
+ #### Module
281
+ - `include` (now public)
277
282
 
278
283
  ## Ruby 2.0 backports
279
284
 
280
- * Array
281
- * `bsearch`
285
+ #### Array
286
+ - `bsearch`
282
287
 
283
- * Enumerable
284
- * `lazy`
288
+ #### Enumerable
289
+ - `lazy`
285
290
 
286
- * Enumerator::Lazy
287
- * all methods
291
+ #### Enumerator::Lazy
292
+ - all methods
288
293
 
289
- * Hash
290
- * `default_proc=` (with nil argument)
291
- * `to_h`
294
+ #### Hash
295
+ - `default_proc=` (with nil argument)
296
+ - `to_h`
292
297
 
293
- * `nil.to_h`
298
+ #### `nil.to_h`
294
299
 
295
- * Range
296
- * `bsearch`
300
+ #### Range
301
+ - `bsearch`
297
302
 
298
- * Struct
299
- * `to_h`
303
+ #### Struct
304
+ - `to_h`
300
305
 
301
306
  ## Ruby 1.9.3 backports
302
307
 
303
- * File
304
- * `NULL`
308
+ #### File
309
+ - `NULL`
305
310
 
306
- * IO
307
- * `advise` (acts as a noop)
308
- * `write`, `binwrite`
311
+ #### IO
312
+ - `advise` (acts as a noop)
313
+ - `write`, `binwrite`
309
314
 
310
- * String
311
- * `byteslice`
312
- * `prepend`
315
+ #### String
316
+ - `byteslice`
317
+ - `prepend`
313
318
 
314
319
  ## Ruby 1.9.2 backports
315
320
 
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)
321
+ #### Array
322
+ - `rotate, rotate!`
323
+ - `keep_if, select!`
324
+ - `product` (with block)
325
+ - `repeated_combination`, `repeated_permutation`
326
+ - `sort_by!`
327
+ - `uniq, uniq!` (with block)
323
328
 
324
- * Complex
325
- * `to_r`
329
+ #### Complex
330
+ - `to_r`
326
331
 
327
- * Dir
328
- * `home`
332
+ #### Dir
333
+ - `home`
329
334
 
330
- * Enumerable
331
- * `chunk`
332
- * `flat_map`, `collect_concat`
333
- * `join`
334
- * `slice_before`
335
+ #### Enumerable
336
+ - `chunk`
337
+ - `flat_map`, `collect_concat`
338
+ - `join`
339
+ - `slice_before`
335
340
 
336
- * Float::INFINITY, NAN
341
+ #### Float::INFINITY, NAN
337
342
 
338
- * Hash
339
- * `keep_if`, `select!`
343
+ #### Hash
344
+ - `keep_if`, `select!`
340
345
 
341
- * Object
342
- * `singleton_class`
346
+ #### Object
347
+ - `singleton_class`
343
348
 
344
- * Random (new class)
349
+ #### Random (new class)
345
350
 
346
351
  *Note*: The methods of `Random` can't be required individually; the class
347
352
  can only be required whole with `require 'backports/1.9.2/random'`.
@@ -349,78 +354,78 @@ can only be required whole with `require 'backports/1.9.2/random'`.
349
354
  ## Ruby 1.9.1 backports
350
355
 
351
356
  Additionally, the following Ruby 1.9 features have been backported:
352
- * Array
353
- * `try_convert`
354
- * `sample`
357
+ #### Array
358
+ - `try_convert`
359
+ - `sample`
355
360
 
356
- * Enumerable
357
- * `each_with_object`
358
- * `each_with_index` (with arguments)
361
+ #### Enumerable
362
+ - `each_with_object`
363
+ - `each_with_index` (with arguments)
359
364
 
360
- * Enumerator
361
- * `new` (with block)
365
+ #### Enumerator
366
+ - `new` (with block)
362
367
 
363
- * File
364
- * `binread`
365
- * `to_path`
366
- * All class methods accepting filenames will accept files or anything
368
+ #### File
369
+ - `binread`
370
+ - `to_path`
371
+ - All class methods accepting filenames will accept files or anything
367
372
  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`
373
+ - `File.open` accepts an options hash.
374
+
375
+ #### Float
376
+ - `round`
377
+
378
+ #### Hash
379
+ - `assoc`, `rassoc`
380
+ - `key`
381
+ - `try_convert`
382
+ - `default_proc=`
383
+
384
+ #### Integer
385
+ - `magnitude`
386
+ - `round`
387
+
388
+ #### IO
389
+ - `bin_read`
390
+ - `try_convert`
391
+ - `ungetbyte`
392
+ - `IO.open` accepts an options hash.
393
+
394
+ #### Kernel
395
+ - `require_relative`
396
+
397
+ #### Math
398
+ - `log` (with base)
399
+ - `log2`
400
+
401
+ #### Numeric
402
+ - `round`
403
+
404
+ #### Object
405
+ - `define_singleton_method`
406
+ - `public_method`
407
+ - `public_send`
408
+
409
+ #### Proc
410
+ - `yield`
411
+ - `lambda?`
412
+ - `curry`
413
+ - `===`
414
+
415
+ #### Range
416
+ - `cover?`
417
+
418
+ #### Regexp
419
+ - `try_convert`
420
+
421
+ #### String
422
+ - `ascii_only?`
423
+ - `chr`
424
+ - `clear`
425
+ - `codepoints`, `each_codepoint`
426
+ - `get_byte`, `set_byte`
427
+ - `ord`
428
+ - `try_convert`
424
429
 
425
430
  `Enumerator` can be accessed directly (instead of `Enumerable::Enumerator`)
426
431
 
@@ -439,9 +444,9 @@ Complete Ruby 1.8.7 backporting (core language). Refer to the official list of
439
444
  backports!
440
445
 
441
446
  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)
447
+ #### String#gsub (the form returning an enumerator)
448
+ #### GC.stress= (not implemented)
449
+ #### Array#choice (removed in 1.9, use 1.9.1's Array#sample instead)
445
450
 
446
451
  ## Libraries
447
452
 
@@ -451,18 +456,18 @@ The backports would be automatically used after requiring 'backports/std_lib' bu
451
456
 
452
457
  The following libraries are up to date with Ruby 1.9.3:
453
458
 
454
- * Matrix
455
- * Prime
456
- * Set
459
+ #### Matrix
460
+ #### Prime
461
+ #### Set
457
462
 
458
463
  The following library is to date with Ruby 2.0.0:
459
464
 
460
- * OpenStruct (ostruct)
465
+ #### OpenStruct (ostruct)
461
466
 
462
467
  I am aware of the following backport gem, which probably won't make it into
463
468
  this gem:
464
469
 
465
- * Net::SMTP for Ruby 1.8.6:
470
+ #### Net::SMTP for Ruby 1.8.6:
466
471
  [smtp_tls](http://seattlerb.rubyforge.org/smtp_tls/)
467
472
 
468
473
  Requiring backports for a given version of Ruby will also load
@@ -474,14 +479,14 @@ Some backports would create incompatibilities in their current Ruby version
474
479
  but could be useful in some projects. It is possible to request such
475
480
  incompatible changes. Backports currently supports the following:
476
481
 
477
- * Hash
478
- * `select` (returns a Hash instead of an Array)
482
+ #### Hash
483
+ - `select` (returns a Hash instead of an Array)
479
484
 
480
- * Enumerable / Array
481
- * `map` (returns an enumerator when called without a block)
485
+ #### Enumerable / Array
486
+ - `map` (returns an enumerator when called without a block)
482
487
 
483
- * String
484
- * `length`, `size` (for UTF-8 support)
488
+ #### String
489
+ - `length`, `size` (for UTF-8 support)
485
490
 
486
491
  These must be imported in addition to the backports gem, for example:
487
492
 
@@ -492,10 +497,10 @@ These must be imported in addition to the backports gem, for example:
492
497
 
493
498
  Thanks for the bug reports and patches, in particular the repeat offenders:
494
499
 
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) )
500
+ #### Arto Bendiken ( [bendiken](http://github.com/bendiken) )
501
+ #### Konstantin Haase ( [rkh](https://github.com/rkh) )
502
+ #### Roger Pack ( [rdp](http://github.com/rdp) )
503
+ #### Victor Shepelev ( [zverok](http://github.com/zverok) )
499
504
 
500
505
  ## Contributing
501
506