backports 3.17.2 → 3.18.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 77d77c662b8e40db4b16b6fbb89ae0a74b5ff93d01acfe1f9c574917b02f43c2
4
- data.tar.gz: 8ce23ad7bc6f156fd73cfa64eb35124fbd3917d1f011c205fc92e4dab186b95a
3
+ metadata.gz: 06c0a76698c28b0610c4d294bbb8e76fbb532407375bd3a720318615f6b513a0
4
+ data.tar.gz: 8c23220b4656c1b2bbffa55b3a4897348eeccba0cd2fb3d177a79525d68937bf
5
5
  SHA512:
6
- metadata.gz: b4814133cc833ff82f446da2b7ee5ced25c026c07cc9701816dec8e3b50a6453e8bf2d2dd8d2c66ffc676f5e2095df9e69f9a8adc23bea0ee1050696d7022a21
7
- data.tar.gz: c0ae89749290bfee6407f74f8527efbcbc5533ce8fa99e16e281aa861d8694540a5effe0f54f171803c9e29ccf98ec323512ed481d489fce0d7b80bd75fb6a9f
6
+ metadata.gz: 19fcf45b4535c94c6ddb5256cbaf44403bb8f018496ac55ed5dcf946dba64fd787a0a3c92ab09b24b32473f3df38d998bd2e5071cd49f9c7a875dbb8450193c2
7
+ data.tar.gz: 986f23de4c7b284ad8633f2cd0ae279e5cf68a55df83a2aef3fa680dedfc013aff636aab635fd454ed154b6e141bfc7ed77096334875403859020833ad186911
@@ -6,7 +6,19 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- Note: [Next major version (X-mas 2020)](https://github.com/marcandre/backports/issues/139) will drop support for Ruby < 2.2.
9
+ Note: [Next major version (X-mas 2020)](https://github.com/marcandre/backports/issues/139) might drop support for Ruby < 2.2, please comment.
10
+
11
+ ## [3.18.0](https://github.com/marcandre/backports/compare/v3.17.2...v3.18.0) - 2020-06-22
12
+
13
+ ### Changed
14
+
15
+ Require per ruby version / all requires now check `RUBY_VERSION` to be more efficient [#149]
16
+
17
+ ## [3.17.2](https://github.com/marcandre/backports/compare/v3.17.1...v3.17.2) - 2020-04-09
18
+
19
+ ### Fixed
20
+
21
+ Fix Range#cover (Ruby 2.6.0) [#148]
10
22
 
11
23
  ## [3.17.1](https://github.com/marcandre/backports/compare/v3.17.0...v3.17.1) - 2020-04-09
12
24
 
@@ -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
- Backports.warned[:require_std_lib] = true
9
- require "backports/std_lib"
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
@@ -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
- Backports.require_relative_dir
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
@@ -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
- Backports.require_relative_dir
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
@@ -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
- Backports.require_relative_dir
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
@@ -1,3 +1,8 @@
1
1
  # require this file to load all the backports up to Ruby 2.0.0
2
2
  require 'backports/1.9'
3
- Backports.require_relative_dir
3
+
4
+ if RUBY_VERSION < '2.0'
5
+ Backports.warned[:require_std_lib] = true
6
+ require "backports/std_lib"
7
+ Backports.require_relative_dir
8
+ end
@@ -1,3 +1,3 @@
1
1
  # require this file to load all the backports up to Ruby 2.1.0
2
2
  require 'backports/2.0'
3
- Backports.require_relative_dir
3
+ Backports.require_relative_dir if RUBY_VERSION < '2.1'
@@ -1,3 +1,3 @@
1
1
  # require this file to load all the backports up to Ruby 2.2
2
2
  require 'backports/2.1'
3
- Backports.require_relative_dir
3
+ Backports.require_relative_dir if RUBY_VERSION < '2.2'
@@ -1,3 +1,3 @@
1
1
  # require this file to load all the backports up to Ruby 2.3
2
2
  require 'backports/2.2'
3
- Backports.require_relative_dir
3
+ Backports.require_relative_dir if RUBY_VERSION < '2.3'
@@ -1,3 +1,3 @@
1
1
  # require this file to load all the backports up to Ruby 2.4
2
2
  require 'backports/2.3'
3
- Backports.require_relative_dir
3
+ Backports.require_relative_dir if RUBY_VERSION < '2.4'
@@ -1,3 +1,3 @@
1
1
  # require this file to load all the backports up to Ruby 2.5
2
2
  require 'backports/2.4'
3
- Backports.require_relative_dir
3
+ Backports.require_relative_dir if RUBY_VERSION < '2.5'
@@ -1,3 +1,3 @@
1
1
  # require this file to load all the backports up to Ruby 2.5
2
2
  require 'backports/2.5'
3
- Backports.require_relative_dir
3
+ Backports.require_relative_dir if RUBY_VERSION < '2.6'
@@ -1,3 +1,3 @@
1
1
  # require this file to load all the backports up to Ruby 2.5
2
2
  require 'backports/2.6'
3
- Backports.require_relative_dir
3
+ Backports.require_relative_dir if RUBY_VERSION < '2.7'
@@ -7,7 +7,12 @@ module Backports
7
7
  compact.
8
8
  sort.
9
9
  each do |f|
10
- require short_path + f
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
@@ -1,3 +1,3 @@
1
1
  module Backports
2
- VERSION = "3.17.2" unless Backports.constants.include? :VERSION # the guard is against a redefinition warning that happens on Travis
2
+ VERSION = "3.18.0" 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.17.2
4
+ version: 3.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc-André Lafortune
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-20 00:00:00.000000000 Z
11
+ date: 2020-06-22 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.