backports 3.21.0 → 3.23.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +401 -304
- data/Gemfile +1 -1
- data/README.md +288 -159
- data/lib/backports/2.1.0/module/singleton_class.rb +8 -0
- data/lib/backports/2.3.0/struct/dig.rb +2 -0
- data/lib/backports/2.5.0/dir/children.rb +4 -0
- data/lib/backports/2.5.0/dir/each_child.rb +7 -0
- data/lib/backports/2.7.0/complex/{comparision.rb → comparison.rb} +0 -0
- data/lib/backports/2.7.0/enumerable/tally.rb +4 -3
- data/lib/backports/2.7.0/symbol/end_with.rb +9 -0
- data/lib/backports/2.7.0/symbol.rb +3 -0
- data/lib/backports/3.0.0/symbol/name.rb +16 -6
- data/lib/backports/3.1.0/array/intersect.rb +16 -0
- data/lib/backports/3.1.0/array.rb +3 -0
- data/lib/backports/3.1.0/class/descendants.rb +11 -0
- data/lib/backports/3.1.0/class/subclasses.rb +11 -0
- data/lib/backports/3.1.0/class.rb +3 -0
- data/lib/backports/3.1.0/enumerable/compact.rb +5 -0
- data/lib/backports/3.1.0/enumerable/tally.rb +18 -0
- data/lib/backports/3.1.0/enumerable.rb +3 -0
- data/lib/backports/3.1.0/file/dirname.rb +16 -0
- data/lib/backports/3.1.0/file.rb +3 -0
- data/lib/backports/3.1.0/integer/try_convert.rb +7 -0
- data/lib/backports/3.1.0/integer.rb +3 -0
- data/lib/backports/3.1.0/match_data/match.rb +5 -0
- data/lib/backports/3.1.0/match_data/match_length.rb +6 -0
- data/lib/backports/3.1.0/match_data.rb +3 -0
- data/lib/backports/3.1.0/struct/keyword_init.rb +5 -0
- data/lib/backports/3.1.0/struct.rb +3 -0
- data/lib/backports/3.1.0.rb +3 -0
- data/lib/backports/3.1.rb +1 -0
- data/lib/backports/latest.rb +1 -1
- data/lib/backports/version.rb +1 -1
- metadata +26 -4
data/CHANGELOG.md
CHANGED
@@ -8,12 +8,58 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
8
8
|
|
9
9
|
Note: [Next major version (X-mas 2021?)](https://github.com/marcandre/backports/issues/139) may drop support for Ruby < 2.2, please comment.
|
10
10
|
|
11
|
+
## [3.23.0](https://github.com/marcandre/backports/compare/v3.22.1...v3.23.0) - 2021-12-28
|
12
|
+
|
13
|
+
### Added
|
14
|
+
|
15
|
+
- `Integer.try_convert` (Ruby 3.1)
|
16
|
+
- `Symbol.end_with?` (Ruby 2.7) [#171]
|
17
|
+
|
18
|
+
## [3.22.1](https://github.com/marcandre/backports/compare/v3.21.0...v3.22.1) - 2021-12-27
|
19
|
+
|
20
|
+
### Added
|
21
|
+
|
22
|
+
Ruby 3.1 backports:
|
23
|
+
|
24
|
+
#### Array
|
25
|
+
|
26
|
+
- `intersect?`
|
27
|
+
|
28
|
+
#### Class
|
29
|
+
|
30
|
+
- `descendants`
|
31
|
+
- `subclasses`
|
32
|
+
|
33
|
+
#### Enumerable
|
34
|
+
|
35
|
+
- `compact`
|
36
|
+
- `tally` (with hash argument)
|
37
|
+
|
38
|
+
### File
|
39
|
+
|
40
|
+
- `dirname` (with depth argument)
|
41
|
+
|
42
|
+
#### MatchData
|
43
|
+
|
44
|
+
- `match`
|
45
|
+
- `match_length`
|
46
|
+
|
47
|
+
#### Struct
|
48
|
+
|
49
|
+
- `keyword_init?`
|
50
|
+
|
51
|
+
## [3.21.0](https://github.com/marcandre/backports/compare/v3.20.1...v3.21.0) - 2021-03-31
|
52
|
+
|
53
|
+
### Added
|
54
|
+
|
55
|
+
- Added `String#unpack1` (Ruby 2.4) [#166]
|
56
|
+
|
11
57
|
## [3.20.1](https://github.com/marcandre/backports/compare/v3.20.0...v3.20.1) - 2021-01-03
|
12
58
|
|
13
59
|
### Fixed
|
14
60
|
|
15
|
-
|
16
|
-
|
61
|
+
- Added `Ractor.[]` and `[]=` [#161]
|
62
|
+
- `Ractor.current` fixed from threads [#161]
|
17
63
|
|
18
64
|
## [3.20.0](https://github.com/marcandre/backports/compare/v3.19.0...v3.20.0) - 2020-12-30
|
19
65
|
|
@@ -25,22 +71,24 @@ Ractor backport (all methods)
|
|
25
71
|
|
26
72
|
### Added
|
27
73
|
|
28
|
-
|
74
|
+
- Ruby 3.0 backports
|
75
|
+
|
76
|
+
- Env
|
29
77
|
|
30
|
-
|
31
|
-
* `except`
|
78
|
+
- `except`
|
32
79
|
|
33
|
-
|
34
|
-
* `except`
|
35
|
-
* `transform_keys`, `transform_keys!` (with hash argument)
|
80
|
+
- Hash
|
36
81
|
|
37
|
-
|
38
|
-
|
82
|
+
- `except`
|
83
|
+
- `transform_keys`, `transform_keys!` (with hash argument)
|
39
84
|
|
40
|
-
|
85
|
+
- Symbol
|
86
|
+
- `name`
|
41
87
|
|
42
|
-
|
43
|
-
|
88
|
+
- Ruby 2.3 backports
|
89
|
+
|
90
|
+
- Queue
|
91
|
+
- `close`, `closed?` (affects `push`, `pop` and aliases)
|
44
92
|
|
45
93
|
## [3.18.2](https://github.com/marcandre/backports/compare/v3.18.0...v3.18.2) - 2020-08-26
|
46
94
|
|
@@ -76,10 +124,10 @@ Fix Range#size (Ruby 2.0) on Ruby 1.8.7 [#144]
|
|
76
124
|
|
77
125
|
### Added
|
78
126
|
|
79
|
-
|
127
|
+
- Ruby 2.6 backports
|
80
128
|
|
81
|
-
|
82
|
-
|
129
|
+
- Range
|
130
|
+
- `cover?` (with `Range` argument)
|
83
131
|
|
84
132
|
### Changed
|
85
133
|
|
@@ -101,148 +149,168 @@ Partly un-deprecated in 3.17.0!
|
|
101
149
|
|
102
150
|
### Added
|
103
151
|
|
104
|
-
|
152
|
+
- Ruby 2.7 backports
|
153
|
+
|
154
|
+
- Array
|
155
|
+
|
156
|
+
- `intersection`
|
157
|
+
|
158
|
+
- Comparable
|
159
|
+
|
160
|
+
- `clamp` (with range)
|
105
161
|
|
106
|
-
|
107
|
-
* `intersection`
|
162
|
+
- Complex
|
108
163
|
|
109
|
-
|
110
|
-
* `clamp` (with range)
|
164
|
+
- `<=>`
|
111
165
|
|
112
|
-
|
113
|
-
* `<=>`
|
166
|
+
- Enumerable
|
114
167
|
|
115
|
-
|
116
|
-
|
117
|
-
* `tally`
|
168
|
+
- `filter_map`
|
169
|
+
- `tally`
|
118
170
|
|
119
|
-
|
120
|
-
* `produce` (class method)
|
171
|
+
- Enumerator
|
121
172
|
|
122
|
-
|
123
|
-
|
173
|
+
- `produce` (class method)
|
174
|
+
|
175
|
+
- Time
|
176
|
+
- `floor`, `ceil`
|
124
177
|
|
125
178
|
## [3.15.0] - 2019-05-15
|
126
179
|
|
127
180
|
### Added
|
128
181
|
|
129
|
-
|
130
|
-
|
182
|
+
- Proc / Method
|
183
|
+
- `<<`, `>>`
|
131
184
|
|
132
185
|
## 3.14.0 - 2019-04-29
|
133
186
|
|
134
187
|
### Added
|
135
188
|
|
136
|
-
|
137
|
-
|
189
|
+
- Hash
|
190
|
+
- `to_h` (with block)
|
138
191
|
|
139
192
|
## 3.13.0 - 2019-04-5
|
140
193
|
|
141
194
|
### Added
|
142
195
|
|
143
|
-
|
144
|
-
|
196
|
+
- Hash
|
197
|
+
- `merge`, `merge!`/`update` (with multiple arguments)
|
145
198
|
|
146
199
|
## 3.12.0 - 2019-02-20
|
147
200
|
|
148
201
|
### Added
|
149
202
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
203
|
+
- Ruby 2.6.0 backports
|
204
|
+
|
205
|
+
- Array
|
206
|
+
|
207
|
+
- `difference`, `union`
|
208
|
+
- `to_h` (with block)
|
154
209
|
|
155
|
-
|
156
|
-
* `chain`
|
157
|
-
* `to_h` (with block)
|
210
|
+
- Enumerable
|
158
211
|
|
159
|
-
|
160
|
-
|
161
|
-
* `then`
|
212
|
+
- `chain`
|
213
|
+
- `to_h` (with block)
|
162
214
|
|
163
|
-
|
164
|
-
|
165
|
-
|
215
|
+
- Enumerator::Chain (use Enumerable#chain)
|
216
|
+
- Kernel
|
217
|
+
- `then`
|
218
|
+
|
219
|
+
- Additional backports for 2.5.0:
|
220
|
+
- String
|
221
|
+
- `undump`
|
166
222
|
|
167
223
|
## 3.11.0 - 2017-12-25
|
168
224
|
|
169
225
|
### Added
|
170
226
|
|
171
|
-
|
172
|
-
|
173
|
-
|
227
|
+
- Ruby version 2.5.0 backports
|
228
|
+
|
229
|
+
- Array
|
230
|
+
|
231
|
+
- `append`, `prepend`
|
232
|
+
|
233
|
+
- Dir
|
234
|
+
|
235
|
+
- `children`, `each_child`
|
236
|
+
|
237
|
+
- Enumerable
|
174
238
|
|
175
|
-
|
176
|
-
* `children`, `each_child`
|
239
|
+
- `any?`, `all?`, `none?`, `one?` (with pattern argument)
|
177
240
|
|
178
|
-
|
179
|
-
* `any?`, `all?`, `none?`, `one?` (with pattern argument)
|
241
|
+
- Hash
|
180
242
|
|
181
|
-
|
182
|
-
|
183
|
-
* `transform_keys`
|
243
|
+
- `slice`
|
244
|
+
- `transform_keys`
|
184
245
|
|
185
|
-
|
186
|
-
* `sqrt`
|
187
|
-
* `allbits?`, `anybits?` and `nobits?`
|
246
|
+
- Integer
|
188
247
|
|
189
|
-
|
190
|
-
|
248
|
+
- `sqrt`
|
249
|
+
- `allbits?`, `anybits?` and `nobits?`
|
191
250
|
|
192
|
-
|
193
|
-
* `attr`, `attr_accessor`, `attr_reader`, `attr_writer` (now public)
|
194
|
-
* `define_method`, `alias_method`, `undef_method`, `remove_method`
|
195
|
-
(now public)
|
251
|
+
- Kernel
|
196
252
|
|
197
|
-
|
198
|
-
* `delete_prefix`, `delete_prefix!`
|
199
|
-
* `delete_suffix`, `delete_suffix!`
|
253
|
+
- `yield_self`
|
200
254
|
|
201
|
-
|
202
|
-
* `new` (with `keyword_init: true`)
|
255
|
+
- Module
|
203
256
|
|
204
|
-
|
205
|
-
|
257
|
+
- `attr`, `attr_accessor`, `attr_reader`, `attr_writer` (now public)
|
258
|
+
- `define_method`, `alias_method`, `undef_method`, `remove_method`
|
259
|
+
(now public)
|
260
|
+
|
261
|
+
- String
|
262
|
+
|
263
|
+
- `delete_prefix`, `delete_prefix!`
|
264
|
+
- `delete_suffix`, `delete_suffix!`
|
265
|
+
|
266
|
+
- Struct
|
267
|
+
- `new` (with `keyword_init: true`)
|
268
|
+
|
269
|
+
- `require 'backports/latest'` is now the way to require everything, but is
|
270
|
+
discouraged
|
206
271
|
|
207
272
|
## 3.10.0 - 2017-10-17
|
208
273
|
|
209
274
|
### Added
|
210
275
|
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
* `sum`
|
276
|
+
- Additional features of 2.4.0
|
277
|
+
|
278
|
+
- Enumerable
|
215
279
|
|
216
|
-
|
217
|
-
|
218
|
-
|
280
|
+
- `uniq`
|
281
|
+
- `sum`
|
282
|
+
|
283
|
+
- Hash
|
284
|
+
- `compact`
|
285
|
+
- `transform_values`
|
219
286
|
|
220
287
|
## 3.9.0 - 2017-10-07
|
221
288
|
|
222
289
|
### Added
|
223
290
|
|
224
|
-
|
225
|
-
|
291
|
+
- From 2.4.0: `dup` for `true`, `false`, `nil`, Numeric
|
292
|
+
- From 2.2.0: `Method#super_method`
|
226
293
|
|
227
294
|
## 3.8.0 - 2017-04-26
|
228
295
|
|
229
296
|
### Added
|
230
297
|
|
231
|
-
|
298
|
+
- From 2.4.0: `String#match?`, `Regexp#match?`
|
299
|
+
|
300
|
+
- From 2.3.0:
|
232
301
|
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
* `Array#bsearch_index`
|
302
|
+
- unary `String#+`, `-`
|
303
|
+
- Numeric: `positive?`, `negative?`
|
304
|
+
- Hash: `to_proc`, `fetch_values`, `>`, `<`, `>=`, `<=`
|
305
|
+
- Enumerable: `chunk_while`, `grep_v`
|
306
|
+
- `{Array|Hash|Struct}#dig`
|
307
|
+
- `Array#bsearch_index`
|
240
308
|
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
309
|
+
- From 2.2.0:
|
310
|
+
- `Method#curry`
|
311
|
+
- `String#unicode_normalize{|?|!}`
|
312
|
+
- `Kernel#itself`
|
313
|
+
- Float: `next_float`, `prev_float`
|
246
314
|
|
247
315
|
## 3.7.0 - 2017-03-28
|
248
316
|
|
@@ -250,146 +318,150 @@ Initiate work on backports of 2.2, 2.3, 2.4
|
|
250
318
|
|
251
319
|
### Added
|
252
320
|
|
253
|
-
|
254
|
-
|
321
|
+
- From 2.4.0:
|
322
|
+
|
323
|
+
- `Comparable#clamp`
|
255
324
|
|
256
|
-
|
257
|
-
|
325
|
+
- From 2.2.0:
|
326
|
+
- Enumerable: `slice_when`, `slice_after`
|
258
327
|
|
259
328
|
## 3.6.0 - 2014-02-14
|
260
329
|
|
261
330
|
### Added
|
262
331
|
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
332
|
+
- Additional features of 2.1.0
|
333
|
+
- Bignum#bit_length
|
334
|
+
- Fixnum#bit_length
|
335
|
+
- Module#include (now public)
|
267
336
|
|
268
337
|
## 3.5.0 - 2014-02-3
|
269
338
|
|
270
339
|
### Added
|
271
340
|
|
272
|
-
|
273
|
-
|
341
|
+
- Additional features of 2.0.0
|
342
|
+
- Range#size
|
274
343
|
|
275
344
|
## 3.4.0 - 2013-12-29
|
276
345
|
|
277
346
|
### Added
|
278
347
|
|
279
|
-
|
280
|
-
|
348
|
+
- Additional features of 2.1.0
|
349
|
+
- Array#to_h, Enumerable#to_h
|
281
350
|
|
282
351
|
## 3.3.0 - 2013-04-03
|
283
352
|
|
284
353
|
### Fixed
|
285
354
|
|
286
|
-
|
355
|
+
- Moved `Proc#yield` & `Hash#key` from 1.8.7 to 1.9.1
|
287
356
|
|
288
357
|
## 3.2.0 - 2013-04-02
|
289
358
|
|
290
359
|
### Fixed
|
291
360
|
|
292
|
-
|
361
|
+
- Moved `Dir.mktmpdir` to the stdlib 'tmpdir' for Ruby 1.8.7
|
293
362
|
|
294
363
|
### Removed
|
295
364
|
|
296
|
-
|
365
|
+
- Removed `returning` as it is no longer part of Rails.
|
297
366
|
|
298
367
|
## 3.1.0 - 2013-03-05
|
299
368
|
|
300
369
|
### Added
|
301
370
|
|
302
|
-
|
371
|
+
- Backports can now be loaded separately!
|
303
372
|
|
304
373
|
### Fixed
|
305
374
|
|
306
|
-
|
375
|
+
- Small tweaks and fixes for many methods to pass more RubySpecs
|
307
376
|
|
308
377
|
## 3.0.0 - 2013-02-24
|
309
378
|
|
310
379
|
### Added
|
311
380
|
|
312
|
-
|
313
|
-
* Struct#to_h, NilClass#to_h, Hash#to_h
|
314
|
-
* Hash#default_proc = nil
|
315
|
-
* OpenStruct lib
|
381
|
+
- Additional features of 2.0.0
|
316
382
|
|
317
|
-
|
383
|
+
- Struct#to_h, NilClass#to_h, Hash#to_h
|
384
|
+
- Hash#default_proc = nil
|
385
|
+
- OpenStruct lib
|
386
|
+
|
387
|
+
- 1.8.7's Enumerator#with_index (it wasn't in the 1.8.7 NEWS file...)
|
318
388
|
|
319
389
|
## 2.8.0 - 2013-02-3
|
320
390
|
|
321
391
|
### Added
|
322
392
|
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
393
|
+
- Added some features of 2.0.0 (must be required explicitly until official
|
394
|
+
release):
|
395
|
+
- Array#bsearch
|
396
|
+
- Range#bsearch
|
327
397
|
|
328
398
|
## 2.7.0 - 2013-01-14
|
329
399
|
|
330
400
|
### Added
|
331
401
|
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
402
|
+
- Features of 2.0.0 (must be required explicitly until official
|
403
|
+
release):
|
404
|
+
- Enumerable#lazy
|
405
|
+
- Enumerator::Lazy
|
336
406
|
|
337
407
|
## 2.6.0 - 2012-05-29
|
338
408
|
|
339
409
|
### Removed
|
340
410
|
|
341
|
-
|
411
|
+
- Enumerable#join
|
342
412
|
|
343
413
|
## 2.5.0 - 2012-02-25
|
344
414
|
|
345
415
|
### Added
|
346
416
|
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
417
|
+
- Some features of 1.9.3:
|
418
|
+
- IO::NULL
|
419
|
+
- IO#advise
|
420
|
+
- String#byteslice
|
421
|
+
- String#prepend
|
352
422
|
|
353
423
|
## 2.4.0 - 2012-02-24
|
354
424
|
|
355
425
|
### Added
|
356
426
|
|
357
|
-
|
427
|
+
- Add backporting for libraries
|
428
|
+
|
429
|
+
- Bring libraries up to date:
|
358
430
|
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
* Set
|
431
|
+
- Matrix
|
432
|
+
- Prime
|
433
|
+
- Set
|
363
434
|
|
364
|
-
|
365
|
-
* IO.write, IO.binwrite
|
435
|
+
- Some features of 1.9.3:
|
366
436
|
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
437
|
+
- IO.write, IO.binwrite
|
438
|
+
|
439
|
+
- Forcing backports (must be required explicitly):
|
440
|
+
- Hash#select (returns a Hash instead of an Array)
|
441
|
+
- Enumerable / Array#map (returns an enumerator when called without a
|
442
|
+
block)
|
443
|
+
- String#length, size (for UTF-8 support)
|
372
444
|
|
373
445
|
## 2.3.0 - 2011-05-13
|
374
446
|
|
375
447
|
### Added
|
376
448
|
|
377
|
-
|
449
|
+
- `Enumerator::Yielder#<<`
|
378
450
|
|
379
451
|
## 2.2.0 - 2011-05-13
|
380
452
|
|
381
453
|
### Fixed
|
382
454
|
|
383
|
-
|
384
|
-
|
455
|
+
- Ruby 1.8.8 was officially cancelled; code was moved to Ruby 1.9.1 and
|
456
|
+
README updated.
|
385
457
|
|
386
|
-
|
458
|
+
- `"".ord` now raises an error.
|
387
459
|
|
388
460
|
## 2.1.0 - 2011-04-16
|
389
461
|
|
390
462
|
### Added
|
391
463
|
|
392
|
-
|
464
|
+
- Proc#curry, #lambda (thanks Konstantine Haase)
|
393
465
|
|
394
466
|
## 2.0.0 - 2010-12-5
|
395
467
|
|
@@ -398,123 +470,123 @@ Initiate work on backports of 2.2, 2.3, 2.4
|
|
398
470
|
Change of major version because of two small changes that are not quite
|
399
471
|
compatible and because the minor version was getting quite high!
|
400
472
|
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
473
|
+
- Remove attempt at faking the new method missing. Unless you used
|
474
|
+
`respond_to_missing` **and**
|
475
|
+
`method(:some_method_handled_with_method_missing)`, you won't see a
|
476
|
+
difference, except better performance (see issue #32) and this fixes some
|
477
|
+
errors (see issue #34)
|
406
478
|
|
407
|
-
|
408
|
-
|
479
|
+
- Change behavior of array.flatten(0) to match Ruby 1.9 (i.e. return a dup
|
480
|
+
of array, instead of array itself)
|
409
481
|
|
410
482
|
## 1.18.0 - 2010-06-19
|
411
483
|
|
412
484
|
### Added
|
413
485
|
|
414
|
-
|
486
|
+
- Some features of 1.9.1:
|
415
487
|
|
416
|
-
|
488
|
+
- Math#log2, Math#log with base
|
417
489
|
|
418
490
|
### Fixed
|
419
491
|
|
420
|
-
|
492
|
+
- Enumerator#each in 1.8.6.
|
421
493
|
|
422
494
|
## 1.17.0 - 2010-05-17
|
423
495
|
|
424
496
|
### Added
|
425
497
|
|
426
|
-
|
498
|
+
- Some features of 1.9.2:
|
427
499
|
|
428
|
-
|
500
|
+
- Array#repeated_combination, #repeated_permutation
|
429
501
|
|
430
502
|
## 1.16.2 - 2010-04-11
|
431
503
|
|
432
504
|
### Added
|
433
505
|
|
434
|
-
|
506
|
+
- Some features of 1.9.2:
|
435
507
|
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
508
|
+
- Array#uniq, #uniq! (with block)
|
509
|
+
- Array#product (with block)
|
510
|
+
- Dir.home
|
511
|
+
- Hash#keep_if, select!
|
512
|
+
- Random (new class)
|
441
513
|
|
442
514
|
## 1.15.0 - 2010-02-23
|
443
515
|
|
444
516
|
### Added
|
445
517
|
|
446
|
-
|
518
|
+
- A features of 1.9.2:
|
447
519
|
|
448
|
-
|
520
|
+
- Object#singleton_class
|
449
521
|
|
450
522
|
## 1.14.0 - 2010-02-3
|
451
523
|
|
452
524
|
### Added
|
453
525
|
|
454
|
-
|
526
|
+
- Some features of 1.9.2:
|
455
527
|
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
528
|
+
- Array#rotate, rotate!
|
529
|
+
- Array#keep_if, select!
|
530
|
+
- Array#sort_by!
|
531
|
+
- Enumerable#join
|
532
|
+
- Enumerable#slice_before
|
533
|
+
- Float::INFINITY, NAN
|
534
|
+
- MatchData#==
|
463
535
|
|
464
536
|
## 1.13.0 - 2010-01-20
|
465
537
|
|
466
538
|
### Added
|
467
539
|
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
540
|
+
- Missing for 1.8.7 were
|
541
|
+
- Array#permutation
|
542
|
+
- Hash#hash (was only inherited)
|
543
|
+
- Hash#eql? (was only inherited)
|
472
544
|
|
473
545
|
## 1.12.0 - 2009-12-4
|
474
546
|
|
475
547
|
### Added
|
476
548
|
|
477
|
-
|
478
|
-
|
479
|
-
|
549
|
+
- Finer grain includes (see README) require "backports/1.9" # requires
|
550
|
+
all ruby backports require "backports/1.9.1" # requires all ruby
|
551
|
+
backports up to 1.9.1 (but not 1.9.2)
|
480
552
|
|
481
|
-
|
482
|
-
|
553
|
+
- Backported all builtin methods of 1.8.8 (most of which where moved from
|
554
|
+
the 1.9 backports)
|
483
555
|
|
484
|
-
|
556
|
+
- Refreshed README
|
485
557
|
|
486
558
|
## 1.11.0 - 2009-11-04
|
487
559
|
|
488
560
|
### Added
|
489
561
|
|
490
|
-
|
562
|
+
- Enumerable#flat_map / collect_concat (Ruby 1.9)
|
491
563
|
|
492
|
-
|
564
|
+
- Object#public_send (Ruby 1.9)
|
493
565
|
|
494
|
-
|
566
|
+
- Object#public_method (Ruby 1.9)
|
495
567
|
|
496
568
|
## 1.10.0 - 2009-09-29
|
497
569
|
|
498
570
|
### Added
|
499
571
|
|
500
|
-
|
572
|
+
- Enumerable#chunk (Ruby 1.9)
|
501
573
|
|
502
|
-
|
574
|
+
- Kernel#respond_to_missing? (Ruby 1.9)
|
503
575
|
|
504
|
-
|
576
|
+
- Completed Process.exec (Ruby 1.8.7)
|
505
577
|
|
506
578
|
## 1.9.0 - 2009-09-04
|
507
579
|
|
508
580
|
### Added
|
509
581
|
|
510
|
-
|
511
|
-
|
582
|
+
- In Ruby 1.9, most class methods of File accept filenames as String, or
|
583
|
+
convertible via #to_str or #to_path.
|
512
584
|
|
513
|
-
|
585
|
+
- File#to_path is also an alias to File#path. These have been backported.
|
514
586
|
|
515
|
-
|
587
|
+
- File.binread (actually IO.binread)
|
516
588
|
|
517
|
-
|
589
|
+
- BasicObject available via "require 'backports/basic_object"
|
518
590
|
|
519
591
|
## 1.8.4 - 2009-09-03
|
520
592
|
|
@@ -533,9 +605,10 @@ The alias String#lines (Ruby 1.8.7)
|
|
533
605
|
### Added
|
534
606
|
|
535
607
|
Backports can be required selectively:
|
536
|
-
|
537
|
-
|
538
|
-
|
608
|
+
|
609
|
+
- backports/1.8.7
|
610
|
+
- backports/1.9 (which include 1.8.7)
|
611
|
+
- rails
|
539
612
|
|
540
613
|
## 1.7.1 - 2009-08-20
|
541
614
|
|
@@ -570,128 +643,149 @@ it.
|
|
570
643
|
|
571
644
|
Completed backport to 1.8.7.
|
572
645
|
|
573
|
-
|
574
|
-
|
646
|
+
- Array
|
647
|
+
|
648
|
+
- `extract_options!`
|
649
|
+
|
650
|
+
- Binding
|
651
|
+
|
652
|
+
- `eval`
|
653
|
+
|
654
|
+
- Dir
|
655
|
+
|
656
|
+
- `each`, `foreach`
|
657
|
+
|
658
|
+
- Enumerator
|
659
|
+
|
660
|
+
- `new`
|
661
|
+
- `with_object`
|
662
|
+
- `next`, `rewind`
|
575
663
|
|
576
|
-
|
577
|
-
* `eval`
|
664
|
+
- Hash
|
578
665
|
|
579
|
-
|
580
|
-
* `each`, `foreach`
|
666
|
+
- Optional block for `delete_if, each, each_key, each_pair, each_value, reject!, select` (and ENV)
|
581
667
|
|
582
|
-
|
583
|
-
* `new`
|
584
|
-
* `with_object`
|
585
|
-
* `next`, `rewind`
|
668
|
+
- Integer
|
586
669
|
|
587
|
-
|
588
|
-
|
589
|
-
reject!, select` (and ENV)
|
670
|
+
- moved stuff out of Fixnum
|
671
|
+
- Optional block for `downto`, `times`, `upto`
|
590
672
|
|
591
|
-
|
592
|
-
* moved stuff out of Fixnum
|
593
|
-
* Optional block for `downto`, `times`, `upto`
|
673
|
+
- IO
|
594
674
|
|
595
|
-
|
596
|
-
|
597
|
-
ARGF)
|
675
|
+
- Optional block for `each`, `each_line`, `each_byte`, `foreach` (and
|
676
|
+
ARGF)
|
598
677
|
|
599
|
-
|
600
|
-
* `loop`, `StopIteration`
|
601
|
-
* +__method__+, +__callee__+
|
678
|
+
- Kernel
|
602
679
|
|
603
|
-
|
604
|
-
|
680
|
+
- `loop`, `StopIteration`
|
681
|
+
- +**method**+, +**callee**+
|
605
682
|
|
606
|
-
|
607
|
-
* `class_exec`, `module_exec`
|
683
|
+
- Method
|
608
684
|
|
609
|
-
|
610
|
-
* `step`
|
685
|
+
- `name`, `owner`, `receiver`
|
611
686
|
|
612
|
-
|
613
|
-
* `define_singleton_method`
|
614
|
-
* `instance_exec`
|
687
|
+
- Module
|
615
688
|
|
616
|
-
|
617
|
-
* `each_object`
|
689
|
+
- `class_exec`, `module_exec`
|
618
690
|
|
619
|
-
|
620
|
-
* Optional block for `each`, `step`
|
691
|
+
- Numeric
|
621
692
|
|
622
|
-
|
623
|
-
* `union`
|
693
|
+
- `step`
|
624
694
|
|
625
|
-
|
626
|
-
* `try_convert`
|
627
|
-
* `ascii_only?`
|
628
|
-
* `bytesize`
|
629
|
-
* `chr`
|
630
|
-
* `clear`
|
631
|
-
* `codepoints`, `each_codepoint`
|
632
|
-
* `stringify_keys`, `stringify_keys!`
|
633
|
-
* `each`, `each_line`, `each_byte`
|
634
|
-
* `gsub`
|
635
|
-
* `upto`
|
695
|
+
- Object
|
636
696
|
|
637
|
-
|
638
|
-
|
697
|
+
- `define_singleton_method`
|
698
|
+
- `instance_exec`
|
639
699
|
|
640
|
-
|
641
|
-
* `<=>`, `casecmp`
|
642
|
-
* `capitalize`, `downcase`, `next`, `succ`, `swapcase`, `upcase`
|
643
|
-
* `=~, [], empty?, length, match, size`
|
700
|
+
- ObjectSpace
|
644
701
|
|
645
|
-
|
646
|
-
|
702
|
+
- `each_object`
|
703
|
+
|
704
|
+
- Range
|
705
|
+
|
706
|
+
- Optional block for `each`, `step`
|
707
|
+
|
708
|
+
- Regexp
|
709
|
+
|
710
|
+
- `union`
|
711
|
+
|
712
|
+
- String
|
713
|
+
|
714
|
+
- `try_convert`
|
715
|
+
- `ascii_only?`
|
716
|
+
- `bytesize`
|
717
|
+
- `chr`
|
718
|
+
- `clear`
|
719
|
+
- `codepoints`, `each_codepoint`
|
720
|
+
- `stringify_keys`, `stringify_keys!`
|
721
|
+
- `each`, `each_line`, `each_byte`
|
722
|
+
- `gsub`
|
723
|
+
- `upto`
|
724
|
+
|
725
|
+
- Struct
|
726
|
+
|
727
|
+
- `each`, `each_pair`
|
728
|
+
|
729
|
+
- Symbol
|
730
|
+
|
731
|
+
- `<=>`, `casecmp`
|
732
|
+
- `capitalize`, `downcase`, `next`, `succ`, `swapcase`, `upcase`
|
733
|
+
- `=~, [], empty?, length, match, size`
|
734
|
+
|
735
|
+
- UnboundMethod
|
736
|
+
- `name`, `owner`
|
647
737
|
|
648
738
|
## 1.5.0 - 2009-04-24
|
649
739
|
|
650
740
|
### Added
|
651
741
|
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
742
|
+
- Array (completed)
|
743
|
+
|
744
|
+
- `combination`
|
745
|
+
- `try_convert`
|
746
|
+
- Optional block for `collect!, :map!, :each, :each_index, :reject, :reject!, :delete_if`
|
747
|
+
- `pop`, `shift`
|
748
|
+
- `product`
|
749
|
+
|
750
|
+
- Fixnum (completed)
|
659
751
|
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
* `magnitude`
|
752
|
+
- `div`, `fdiv`
|
753
|
+
- `succ`
|
754
|
+
- `magnitude`
|
664
755
|
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
756
|
+
- Enumerable (completed)
|
757
|
+
- `each_with_object`
|
758
|
+
- `inject`
|
759
|
+
- `max_by`, `min_by`, `minmax`, `minmax_by`
|
760
|
+
- `reduce`
|
761
|
+
- `to_a`
|
671
762
|
|
672
763
|
## 1.4.0 - 2009-04-21
|
673
764
|
|
674
765
|
### Added
|
675
766
|
|
676
|
-
|
677
|
-
* `rpartition`
|
767
|
+
- String
|
678
768
|
|
679
|
-
|
680
|
-
|
769
|
+
- `rpartition`
|
770
|
+
|
771
|
+
- Proc
|
772
|
+
- `yield`
|
681
773
|
|
682
774
|
## 1.3.0 - 2009-04-17
|
683
775
|
|
684
776
|
### Added
|
685
777
|
|
686
|
-
|
687
|
-
|
778
|
+
- Enumerable
|
779
|
+
|
780
|
+
- `none?`
|
688
781
|
|
689
|
-
|
690
|
-
* `sample`, `shuffle`, `shuffle!`
|
782
|
+
- Array
|
691
783
|
|
692
|
-
|
693
|
-
|
694
|
-
|
784
|
+
- `sample`, `shuffle`, `shuffle!`
|
785
|
+
|
786
|
+
- String
|
787
|
+
- `each_char`, `chars`
|
788
|
+
- `partition`
|
695
789
|
|
696
790
|
Tests and fixes for `String#start_with?` and `String#end_with?`
|
697
791
|
|
@@ -699,39 +793,42 @@ Tests and fixes for `String#start_with?` and `String#end_with?`
|
|
699
793
|
|
700
794
|
### Added
|
701
795
|
|
702
|
-
|
703
|
-
|
704
|
-
|
796
|
+
- Array
|
797
|
+
|
798
|
+
- `reverse_each`
|
799
|
+
- `cycle`
|
705
800
|
|
706
|
-
|
707
|
-
* `reverse_each`
|
708
|
-
* `each_slice`, `each_cons`
|
709
|
-
* `count`
|
710
|
-
* `cycle`
|
711
|
-
* `group_by`
|
801
|
+
- Enumerable
|
712
802
|
|
713
|
-
|
714
|
-
|
803
|
+
- `reverse_each`
|
804
|
+
- `each_slice`, `each_cons`
|
805
|
+
- `count`
|
806
|
+
- `cycle`
|
807
|
+
- `group_by`
|
808
|
+
|
809
|
+
- Hash
|
810
|
+
- `default_proc=`
|
715
811
|
|
716
812
|
## 1.1.0 - 2009-04-11
|
717
813
|
|
718
814
|
### Added
|
719
815
|
|
720
|
-
|
721
|
-
|
722
|
-
|
816
|
+
- Array
|
817
|
+
|
818
|
+
- `flatten`, `flatten!`
|
819
|
+
- `find_index`, `index`
|
723
820
|
|
724
|
-
|
725
|
-
|
821
|
+
- Hash
|
822
|
+
- `reverse_merge`, `reverse_merge!`
|
726
823
|
|
727
824
|
## 1.0.0 - 2009-04-2
|
728
825
|
|
729
|
-
|
826
|
+
- Initial release.
|
730
827
|
|
731
828
|
## Notes
|
732
829
|
|
733
830
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
734
831
|
|
735
|
-
[
|
832
|
+
[unreleased]: https://github.com/marcandre/backports/compare/v3.16.0...HEAD
|
736
833
|
[3.16.0]: https://github.com/marcandre/backports/compare/v3.15.0...v3.16.0
|
737
834
|
[3.15.0]: https://github.com/marcandre/backports/compare/v3.14.0...v3.15.0
|