backports 3.17.0 → 3.18.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -2
- data/Gemfile +1 -14
- data/README.md +244 -244
- data/backports.gemspec +1 -1
- data/lib/backports/1.8.7.rb +5 -4
- data/lib/backports/1.9.1.rb +6 -1
- data/lib/backports/1.9.2.rb +6 -1
- data/lib/backports/1.9.3.rb +6 -1
- data/lib/backports/2.0.0.rb +6 -1
- data/lib/backports/2.0.0/range/size.rb +2 -0
- data/lib/backports/2.1.0.rb +1 -1
- data/lib/backports/2.2.0.rb +1 -1
- data/lib/backports/2.3.0.rb +1 -1
- data/lib/backports/2.3.0/string.rb +3 -0
- data/lib/backports/2.4.0.rb +1 -1
- data/lib/backports/2.5.0.rb +1 -1
- data/lib/backports/2.5.0/struct/new.rb +1 -1
- data/lib/backports/2.6.0.rb +1 -1
- data/lib/backports/2.7.0.rb +1 -1
- data/lib/backports/tools/require_relative_dir.rb +6 -1
- data/lib/backports/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 178159f05e53f3b3fc1c828a000e71a5f1860b058cf91c651f49b252ce05f130
|
4
|
+
data.tar.gz: b088578f04bd15de52d682caa6f9ba4fbe819a8d51fb66f89a8323019e40ca49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14187360b8a6f5a85f61a1ab8cac5121ce6bbc468dab22cefd8ec73c85cf834d1865a83da9fb3e2ddb3ec2adee5cbf90e4e8d22c254e14d543e5d9491d166736
|
7
|
+
data.tar.gz: b3456f62ca139a0beec8d4f8b3faff8ed7616da4fc3e31083bc9647a816c7c55ef8eb568f4f9dd101ff62e1279cc90e8f32ec67a67ccb14be3e902ef9af07ba1
|
data/CHANGELOG.md
CHANGED
@@ -6,9 +6,39 @@ 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)
|
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
10
|
|
11
|
-
## [3.
|
11
|
+
## [3.18.2](https://github.com/marcandre/backports/compare/v3.18.0...v3.18.2) - 2020-08-26
|
12
|
+
|
13
|
+
### Fixed
|
14
|
+
|
15
|
+
Require per ruby version now properly requiring 2.3.0 backports for `String` [#152]
|
16
|
+
|
17
|
+
## [3.18.2](https://github.com/marcandre/backports/compare/v3.18.1...v3.18.2) - 2020-08-26
|
18
|
+
|
19
|
+
### Fixed
|
20
|
+
|
21
|
+
Fixed Changelog URI in gem manifest
|
22
|
+
|
23
|
+
## [3.18.0](https://github.com/marcandre/backports/compare/v3.17.2...v3.18.0) - 2020-06-22
|
24
|
+
|
25
|
+
### Changed
|
26
|
+
|
27
|
+
Require per ruby version / all requires now check `RUBY_VERSION` to be more efficient [#149]
|
28
|
+
|
29
|
+
## [3.17.2](https://github.com/marcandre/backports/compare/v3.17.1...v3.17.2) - 2020-04-09
|
30
|
+
|
31
|
+
### Fixed
|
32
|
+
|
33
|
+
Fix Range#cover (Ruby 2.6.0) [#148]
|
34
|
+
|
35
|
+
## [3.17.1](https://github.com/marcandre/backports/compare/v3.17.0...v3.17.1) - 2020-04-09
|
36
|
+
|
37
|
+
### Fixed
|
38
|
+
|
39
|
+
Fix Range#size (Ruby 2.0) on Ruby 1.8.7 [#144]
|
40
|
+
|
41
|
+
## [3.17.0](https://github.com/marcandre/backports/compare/v3.16.2...v3.17.0) - 2020-03-06
|
12
42
|
|
13
43
|
### Added
|
14
44
|
|
data/Gemfile
CHANGED
@@ -1,17 +1,12 @@
|
|
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 '
|
14
|
-
gem 'test-unit', '~>2.1.1.0'
|
9
|
+
gem 'test-unit'
|
15
10
|
end
|
16
11
|
|
17
12
|
if RUBY_VERSION >= '2.3.0'
|
@@ -19,11 +14,3 @@ if RUBY_VERSION >= '2.3.0'
|
|
19
14
|
gem 'rubocop', '~> 0.80.0'
|
20
15
|
end
|
21
16
|
end
|
22
|
-
|
23
|
-
# Declare any dependencies that are still in development here instead of in
|
24
|
-
# your gemspec. These might include edge Rails or gems from your path or
|
25
|
-
# Git. Remember to move these dependencies to your gemspec before releasing
|
26
|
-
# your gem to rubygems.org.
|
27
|
-
|
28
|
-
# To use debugger
|
29
|
-
# gem 'ruby-debug19', :require => 'ruby-debug'
|
data/README.md
CHANGED
@@ -65,14 +65,14 @@ Goals for backported features:
|
|
65
65
|
Let's be a bit more precise about the "breaking code" business. It is of
|
66
66
|
course entirely possible that code will break. In particular, you may be
|
67
67
|
distinguishing parameters with duck typing, but a builtin class may, in the
|
68
|
-
future, be responding to a particular call. Here's
|
69
|
-
Rails}(https://github.com/rails/rails/blob/a4b55827721a5967299f3c1531afb3d6d81
|
70
|
-
e4ac0/activerecord/lib/active_record/associations/association.rb#L155-L159)
|
68
|
+
future, be responding to a particular call. Here's [an example from Rails][]
|
71
69
|
that is relying on the fact that Proc and Method respond to :to_proc and Hash
|
72
70
|
isn't. That is, until Ruby 2.3... This old version of Rails therefore won't
|
73
71
|
work on Ruby 2.3, or on older Rubies with that the `2.3.0/hash/to_proc`
|
74
72
|
loaded...
|
75
73
|
|
74
|
+
[an example from rails]: https://github.com/rails/rails/blob/a4b55827721a5967299f3c1531afb3d6d81e4ac0/activerecord/lib/active_record/associations/association.rb#L155-L159
|
75
|
+
|
76
76
|
For Ruby < 2.0, there are some real incompatibilities. For example,
|
77
77
|
`Module::instance_methods` which returns strings in 1.8 and symbols in 1.9. No
|
78
78
|
change can be made without the risk of breaking existing code. Such
|
@@ -111,242 +111,242 @@ itself, JRuby and Rubinius.
|
|
111
111
|
|
112
112
|
## Ruby 2.7 backports
|
113
113
|
|
114
|
-
|
115
|
-
|
114
|
+
#### Array
|
115
|
+
- `intersection`
|
116
116
|
|
117
|
-
|
118
|
-
|
117
|
+
#### Comparable
|
118
|
+
- `clamp` (with range)
|
119
119
|
|
120
|
-
|
121
|
-
|
120
|
+
#### Complex
|
121
|
+
- +<=>+
|
122
122
|
|
123
|
-
|
124
|
-
|
125
|
-
|
123
|
+
#### Enumerable
|
124
|
+
- `filter_map`
|
125
|
+
- `tally`
|
126
126
|
|
127
|
-
|
128
|
-
|
127
|
+
#### Enumerator
|
128
|
+
- `produce` (class method)
|
129
129
|
|
130
|
-
|
131
|
-
|
130
|
+
#### Time
|
131
|
+
- `floor`, `ceil`
|
132
132
|
|
133
133
|
## Ruby 2.6 backports
|
134
134
|
|
135
|
-
|
136
|
-
|
137
|
-
|
135
|
+
#### Array
|
136
|
+
- `difference`, `union`
|
137
|
+
- `to_h` (with block)
|
138
138
|
|
139
|
-
|
140
|
-
|
141
|
-
|
139
|
+
#### Enumerable
|
140
|
+
- `chain`
|
141
|
+
- `to_h` (with block)
|
142
142
|
|
143
|
-
|
143
|
+
#### Enumerator::Chain (use Enumerable#chain)
|
144
144
|
|
145
|
-
|
146
|
-
|
147
|
-
|
145
|
+
#### Hash
|
146
|
+
- `merge`, `merge!`/`update` (with multiple arguments)
|
147
|
+
- `to_h` (with block)
|
148
148
|
|
149
|
-
|
150
|
-
|
149
|
+
#### Kernel
|
150
|
+
- `then`
|
151
151
|
|
152
|
-
|
153
|
-
|
152
|
+
#### Method
|
153
|
+
- +<<+, +>>+
|
154
154
|
|
155
|
-
|
156
|
-
|
155
|
+
#### Proc
|
156
|
+
- +<<+, +>>+
|
157
157
|
|
158
|
-
|
159
|
-
|
158
|
+
#### Range
|
159
|
+
- `cover?` (with `Range` argument)
|
160
160
|
|
161
161
|
## Ruby 2.5 backports
|
162
162
|
|
163
|
-
|
164
|
-
|
163
|
+
#### Array
|
164
|
+
- `append`, `prepend`
|
165
165
|
|
166
|
-
|
167
|
-
|
166
|
+
#### Dir
|
167
|
+
- `children`, `each_child`
|
168
168
|
|
169
|
-
|
170
|
-
|
169
|
+
#### Enumerable
|
170
|
+
- `any?`, `all?`, `none?`, `one?` (with pattern argument)
|
171
171
|
|
172
|
-
|
173
|
-
|
174
|
-
|
172
|
+
#### Hash
|
173
|
+
- `slice`
|
174
|
+
- `transform_keys`
|
175
175
|
|
176
|
-
|
177
|
-
|
178
|
-
|
176
|
+
#### Integer
|
177
|
+
- `sqrt`
|
178
|
+
- `allbits?`, `anybits?` and `nobits?`
|
179
179
|
|
180
|
-
|
181
|
-
|
180
|
+
#### Kernel
|
181
|
+
- `yield_self`
|
182
182
|
|
183
|
-
|
184
|
-
|
185
|
-
|
183
|
+
#### Module
|
184
|
+
- `attr`, `attr_accessor`, `attr_reader`, `attr_writer` (now public)
|
185
|
+
- `define_method`, `alias_method`, `undef_method`, `remove_method` (now
|
186
186
|
public)
|
187
187
|
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
188
|
+
#### String
|
189
|
+
- `delete_prefix`, `delete_prefix!`
|
190
|
+
- `delete_suffix`, `delete_suffix!`
|
191
|
+
- `undump`
|
192
192
|
|
193
|
-
|
194
|
-
|
193
|
+
#### Struct
|
194
|
+
- `new` (with `keyword_init: true`)
|
195
195
|
|
196
196
|
## Ruby 2.4 backports
|
197
197
|
|
198
|
-
|
199
|
-
|
198
|
+
#### Comparable
|
199
|
+
- `clamp`
|
200
200
|
|
201
|
-
|
202
|
-
|
203
|
-
|
201
|
+
#### Enumerable
|
202
|
+
- `sum`
|
203
|
+
- `uniq`
|
204
204
|
|
205
|
-
|
206
|
-
|
207
|
-
|
205
|
+
#### Hash
|
206
|
+
- `compact`, `compact!`
|
207
|
+
- `transform_values`, `transform_values!`
|
208
208
|
|
209
|
-
|
210
|
-
|
209
|
+
#### Regexp
|
210
|
+
- `match?`
|
211
211
|
|
212
|
-
|
213
|
-
|
212
|
+
#### String
|
213
|
+
- `match?`
|
214
214
|
|
215
|
-
|
216
|
-
|
215
|
+
#### FalseClass, Fixnum, Float, NilClass, TrueClass
|
216
|
+
- `dup`
|
217
217
|
|
218
218
|
## Ruby 2.3 backports
|
219
219
|
|
220
|
-
|
221
|
-
|
222
|
-
|
220
|
+
#### Array
|
221
|
+
- `bsearch_index`
|
222
|
+
- `dig`
|
223
223
|
|
224
|
-
|
225
|
-
|
226
|
-
|
224
|
+
#### Enumerable
|
225
|
+
- `chunk_while`
|
226
|
+
- `grep_v`
|
227
227
|
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
228
|
+
#### Hash
|
229
|
+
- `dig`
|
230
|
+
- `fetch_values`
|
231
|
+
- `to_proc`
|
232
|
+
- <=, <, >=, >
|
233
233
|
|
234
|
-
|
235
|
-
|
236
|
-
|
234
|
+
#### Numeric
|
235
|
+
- `negative?`
|
236
|
+
- `positive?`
|
237
237
|
|
238
|
-
|
239
|
-
|
238
|
+
#### String
|
239
|
+
- unary + and -
|
240
240
|
|
241
|
-
|
242
|
-
|
241
|
+
#### Struct
|
242
|
+
- `dig`
|
243
243
|
|
244
244
|
## Ruby 2.2 backports
|
245
245
|
|
246
|
-
|
247
|
-
|
248
|
-
|
246
|
+
#### Enumerable
|
247
|
+
- `slice_after`
|
248
|
+
- `slice_when`
|
249
249
|
|
250
|
-
|
251
|
-
|
252
|
-
|
250
|
+
#### Float
|
251
|
+
- `prev_float`
|
252
|
+
- `next_float`
|
253
253
|
|
254
|
-
|
255
|
-
|
254
|
+
#### Kernel
|
255
|
+
- `itself`
|
256
256
|
|
257
|
-
|
258
|
-
|
259
|
-
|
257
|
+
#### Method
|
258
|
+
- `curry`
|
259
|
+
- `super_method`
|
260
260
|
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
261
|
+
#### String
|
262
|
+
- `unicode_normalize`
|
263
|
+
- `unicode_normalize!`
|
264
|
+
- `unicode_normalize?`
|
265
265
|
|
266
266
|
## Ruby 2.1 backports
|
267
267
|
|
268
|
-
|
269
|
-
|
268
|
+
#### Array
|
269
|
+
- `to_h`
|
270
270
|
|
271
|
-
|
272
|
-
|
271
|
+
#### Bignum
|
272
|
+
- `bit_length`
|
273
273
|
|
274
|
-
|
275
|
-
|
274
|
+
#### Enumerable
|
275
|
+
- `to_h`
|
276
276
|
|
277
|
-
|
278
|
-
|
277
|
+
#### Fixnum
|
278
|
+
- `bit_length`
|
279
279
|
|
280
|
-
|
281
|
-
|
280
|
+
#### Module
|
281
|
+
- `include` (now public)
|
282
282
|
|
283
283
|
## Ruby 2.0 backports
|
284
284
|
|
285
|
-
|
286
|
-
|
285
|
+
#### Array
|
286
|
+
- `bsearch`
|
287
287
|
|
288
|
-
|
289
|
-
|
288
|
+
#### Enumerable
|
289
|
+
- `lazy`
|
290
290
|
|
291
|
-
|
292
|
-
|
291
|
+
#### Enumerator::Lazy
|
292
|
+
- all methods
|
293
293
|
|
294
|
-
|
295
|
-
|
296
|
-
|
294
|
+
#### Hash
|
295
|
+
- `default_proc=` (with nil argument)
|
296
|
+
- `to_h`
|
297
297
|
|
298
|
-
|
298
|
+
#### `nil.to_h`
|
299
299
|
|
300
|
-
|
301
|
-
|
300
|
+
#### Range
|
301
|
+
- `bsearch`
|
302
302
|
|
303
|
-
|
304
|
-
|
303
|
+
#### Struct
|
304
|
+
- `to_h`
|
305
305
|
|
306
306
|
## Ruby 1.9.3 backports
|
307
307
|
|
308
|
-
|
309
|
-
|
308
|
+
#### File
|
309
|
+
- `NULL`
|
310
310
|
|
311
|
-
|
312
|
-
|
313
|
-
|
311
|
+
#### IO
|
312
|
+
- `advise` (acts as a noop)
|
313
|
+
- `write`, `binwrite`
|
314
314
|
|
315
|
-
|
316
|
-
|
317
|
-
|
315
|
+
#### String
|
316
|
+
- `byteslice`
|
317
|
+
- `prepend`
|
318
318
|
|
319
319
|
## Ruby 1.9.2 backports
|
320
320
|
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
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)
|
328
328
|
|
329
|
-
|
330
|
-
|
329
|
+
#### Complex
|
330
|
+
- `to_r`
|
331
331
|
|
332
|
-
|
333
|
-
|
332
|
+
#### Dir
|
333
|
+
- `home`
|
334
334
|
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
335
|
+
#### Enumerable
|
336
|
+
- `chunk`
|
337
|
+
- `flat_map`, `collect_concat`
|
338
|
+
- `join`
|
339
|
+
- `slice_before`
|
340
340
|
|
341
|
-
|
341
|
+
#### Float::INFINITY, NAN
|
342
342
|
|
343
|
-
|
344
|
-
|
343
|
+
#### Hash
|
344
|
+
- `keep_if`, `select!`
|
345
345
|
|
346
|
-
|
347
|
-
|
346
|
+
#### Object
|
347
|
+
- `singleton_class`
|
348
348
|
|
349
|
-
|
349
|
+
#### Random (new class)
|
350
350
|
|
351
351
|
*Note*: The methods of `Random` can't be required individually; the class
|
352
352
|
can only be required whole with `require 'backports/1.9.2/random'`.
|
@@ -354,78 +354,78 @@ can only be required whole with `require 'backports/1.9.2/random'`.
|
|
354
354
|
## Ruby 1.9.1 backports
|
355
355
|
|
356
356
|
Additionally, the following Ruby 1.9 features have been backported:
|
357
|
-
|
358
|
-
|
359
|
-
|
357
|
+
#### Array
|
358
|
+
- `try_convert`
|
359
|
+
- `sample`
|
360
360
|
|
361
|
-
|
362
|
-
|
363
|
-
|
361
|
+
#### Enumerable
|
362
|
+
- `each_with_object`
|
363
|
+
- `each_with_index` (with arguments)
|
364
364
|
|
365
|
-
|
366
|
-
|
365
|
+
#### Enumerator
|
366
|
+
- `new` (with block)
|
367
367
|
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
368
|
+
#### File
|
369
|
+
- `binread`
|
370
|
+
- `to_path`
|
371
|
+
- All class methods accepting filenames will accept files or anything
|
372
372
|
with a `#to_path` method.
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
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`
|
429
429
|
|
430
430
|
`Enumerator` can be accessed directly (instead of `Enumerable::Enumerator`)
|
431
431
|
|
@@ -444,9 +444,9 @@ Complete Ruby 1.8.7 backporting (core language). Refer to the official list of
|
|
444
444
|
backports!
|
445
445
|
|
446
446
|
Only exceptions:
|
447
|
-
|
448
|
-
|
449
|
-
|
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)
|
450
450
|
|
451
451
|
## Libraries
|
452
452
|
|
@@ -456,18 +456,18 @@ The backports would be automatically used after requiring 'backports/std_lib' bu
|
|
456
456
|
|
457
457
|
The following libraries are up to date with Ruby 1.9.3:
|
458
458
|
|
459
|
-
|
460
|
-
|
461
|
-
|
459
|
+
#### Matrix
|
460
|
+
#### Prime
|
461
|
+
#### Set
|
462
462
|
|
463
463
|
The following library is to date with Ruby 2.0.0:
|
464
464
|
|
465
|
-
|
465
|
+
#### OpenStruct (ostruct)
|
466
466
|
|
467
467
|
I am aware of the following backport gem, which probably won't make it into
|
468
468
|
this gem:
|
469
469
|
|
470
|
-
|
470
|
+
#### Net::SMTP for Ruby 1.8.6:
|
471
471
|
[smtp_tls](http://seattlerb.rubyforge.org/smtp_tls/)
|
472
472
|
|
473
473
|
Requiring backports for a given version of Ruby will also load
|
@@ -479,14 +479,14 @@ Some backports would create incompatibilities in their current Ruby version
|
|
479
479
|
but could be useful in some projects. It is possible to request such
|
480
480
|
incompatible changes. Backports currently supports the following:
|
481
481
|
|
482
|
-
|
483
|
-
|
482
|
+
#### Hash
|
483
|
+
- `select` (returns a Hash instead of an Array)
|
484
484
|
|
485
|
-
|
486
|
-
|
485
|
+
#### Enumerable / Array
|
486
|
+
- `map` (returns an enumerator when called without a block)
|
487
487
|
|
488
|
-
|
489
|
-
|
488
|
+
#### String
|
489
|
+
- `length`, `size` (for UTF-8 support)
|
490
490
|
|
491
491
|
These must be imported in addition to the backports gem, for example:
|
492
492
|
|
@@ -497,10 +497,10 @@ These must be imported in addition to the backports gem, for example:
|
|
497
497
|
|
498
498
|
Thanks for the bug reports and patches, in particular the repeat offenders:
|
499
499
|
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
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) )
|
504
504
|
|
505
505
|
## Contributing
|
506
506
|
|
data/backports.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |gem|
|
|
23
23
|
gem.require_paths = ["lib"]
|
24
24
|
|
25
25
|
if gem.respond_to?(:metadata)
|
26
|
-
gem.metadata['changelog_uri'] = 'https://github.com/marcandre/backports/blob/master/CHANGELOG.
|
26
|
+
gem.metadata['changelog_uri'] = 'https://github.com/marcandre/backports/blob/master/CHANGELOG.md'
|
27
27
|
gem.metadata['source_code_uri'] = 'https://github.com/marcandre/backports'
|
28
28
|
gem.metadata['bug_tracker_uri'] = 'https://github.com/marcandre/backports/issues'
|
29
29
|
end
|
data/lib/backports/1.8.7.rb
CHANGED
@@ -5,7 +5,8 @@ require "backports/tools/deprecation"
|
|
5
5
|
Backports.frown_upon :require_version,
|
6
6
|
'Requiring backports/<ruby version> is not recommended in production. Require just the needed backports instead.'
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
Backports.require_relative_dir
|
8
|
+
if RUBY_VERSION < '1.8.7'
|
9
|
+
Backports.warned[:require_std_lib] = true
|
10
|
+
require "backports/std_lib"
|
11
|
+
Backports.require_relative_dir
|
12
|
+
end
|
data/lib/backports/1.9.1.rb
CHANGED
@@ -1,3 +1,8 @@
|
|
1
1
|
# require this file to load all the backports up to Ruby 1.9.1 (including all of 1.8.8 and below)
|
2
2
|
require 'backports/1.8'
|
3
|
-
|
3
|
+
|
4
|
+
if RUBY_VERSION < '1.9.1'
|
5
|
+
Backports.warned[:require_std_lib] = true
|
6
|
+
require "backports/std_lib"
|
7
|
+
Backports.require_relative_dir
|
8
|
+
end
|
data/lib/backports/1.9.2.rb
CHANGED
@@ -1,3 +1,8 @@
|
|
1
1
|
# require this file to load all the backports up to Ruby 1.9.2
|
2
2
|
require 'backports/1.9.1'
|
3
|
-
|
3
|
+
|
4
|
+
if RUBY_VERSION < '1.9.2'
|
5
|
+
Backports.warned[:require_std_lib] = true
|
6
|
+
require "backports/std_lib"
|
7
|
+
Backports.require_relative_dir
|
8
|
+
end
|
data/lib/backports/1.9.3.rb
CHANGED
@@ -1,3 +1,8 @@
|
|
1
1
|
# require this file to load all the backports up to Ruby 1.9.3
|
2
2
|
require 'backports/1.9.2'
|
3
|
-
|
3
|
+
|
4
|
+
if RUBY_VERSION < '1.9.3'
|
5
|
+
Backports.warned[:require_std_lib] = true
|
6
|
+
require "backports/std_lib"
|
7
|
+
Backports.require_relative_dir
|
8
|
+
end
|
data/lib/backports/2.0.0.rb
CHANGED
data/lib/backports/2.1.0.rb
CHANGED
data/lib/backports/2.2.0.rb
CHANGED
data/lib/backports/2.3.0.rb
CHANGED
data/lib/backports/2.4.0.rb
CHANGED
data/lib/backports/2.5.0.rb
CHANGED
data/lib/backports/2.6.0.rb
CHANGED
data/lib/backports/2.7.0.rb
CHANGED
@@ -7,7 +7,12 @@ module Backports
|
|
7
7
|
compact.
|
8
8
|
sort.
|
9
9
|
each do |f|
|
10
|
-
|
10
|
+
path = '../../' + short_path + f
|
11
|
+
if Kernel.private_method_defined?(:require_relative)
|
12
|
+
require_relative path
|
13
|
+
else
|
14
|
+
require File.expand_path(path)
|
15
|
+
end
|
11
16
|
end
|
12
17
|
end
|
13
18
|
end
|
data/lib/backports/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module Backports
|
2
|
-
VERSION = "3.
|
2
|
+
VERSION = "3.18.2" unless Backports.constants.include? :VERSION # the guard is against a redefinition warning that happens on Travis
|
3
3
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.18.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc-André Lafortune
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Essential backports that enable many of the nice features of Ruby for
|
14
14
|
earlier versions.
|
@@ -425,6 +425,7 @@ files:
|
|
425
425
|
- lib/backports/2.3.0/numeric.rb
|
426
426
|
- lib/backports/2.3.0/numeric/negative.rb
|
427
427
|
- lib/backports/2.3.0/numeric/positive.rb
|
428
|
+
- lib/backports/2.3.0/string.rb
|
428
429
|
- lib/backports/2.3.0/string/uminus.rb
|
429
430
|
- lib/backports/2.3.0/string/uplus.rb
|
430
431
|
- lib/backports/2.3.0/struct.rb
|
@@ -566,10 +567,10 @@ homepage: http://github.com/marcandre/backports
|
|
566
567
|
licenses:
|
567
568
|
- MIT
|
568
569
|
metadata:
|
569
|
-
changelog_uri: https://github.com/marcandre/backports/blob/master/CHANGELOG.
|
570
|
+
changelog_uri: https://github.com/marcandre/backports/blob/master/CHANGELOG.md
|
570
571
|
source_code_uri: https://github.com/marcandre/backports
|
571
572
|
bug_tracker_uri: https://github.com/marcandre/backports/issues
|
572
|
-
post_install_message:
|
573
|
+
post_install_message:
|
573
574
|
rdoc_options: []
|
574
575
|
require_paths:
|
575
576
|
- lib
|
@@ -584,8 +585,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
584
585
|
- !ruby/object:Gem::Version
|
585
586
|
version: '0'
|
586
587
|
requirements: []
|
587
|
-
rubygems_version: 3.
|
588
|
-
signing_key:
|
588
|
+
rubygems_version: 3.1.2
|
589
|
+
signing_key:
|
589
590
|
specification_version: 4
|
590
591
|
summary: Backports of Ruby features for older Ruby.
|
591
592
|
test_files: []
|