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