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