backports 3.12.0 → 3.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ODRmY2Q4YmY5NzU5YTM0NzM3NjgwYTBkZWNiNTczM2JiM2FmNWZhYw==
5
- data.tar.gz: !binary |-
6
- OWFjNjgyNDQ5ZWM4MDMwYjUyYTUxYWI2MjJlZGQ2NWI1ZmMxOTI1Yg==
2
+ SHA256:
3
+ metadata.gz: 2a76e1f607397fd9f67eefdd6d6cd3ad1b8a1471850fa0b6a2317468e4937a16
4
+ data.tar.gz: 7082254021aa4b12c50951412bf176ae1c064c77bffd9406368891ad0f819f43
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZTY4N2YzYzYzY2YzNTkxOWYzNTJmOWQ5ZmU5ZjZjYzA4ZWExNWMwOTMzODI5
10
- ZmExMGEwNTdmZjk5OTRhMjhmNzMwNzMzYjViYjhhMzg3YWI3MjU5NzNlN2I2
11
- YTZiZWRiYzVlZTFkNDJmM2FiMjIwZjEwODFmZGUwNzZkMjRlODQ=
12
- data.tar.gz: !binary |-
13
- NjI2ZjkzODNhNDZlMTRhYWVhYTkxYjNhYTVjMDQ2NTk0YjI0NzY0Yzg4OTky
14
- MjRkM2VjNzgxZmUxYzQ4YmMyNWE2MTJiNmM1Njg4MTU1MmQ1YWExMzkyZmU1
15
- Mzc4MmNmZDE1OTVmZmUzMGE5ODkwOGZmYjAyMWMxZDNmYmQyYjU=
6
+ metadata.gz: a9246bbb573a0f0fecb2cc6c845e4c5a8dad9c2410b9c0f7125596607d5294ac661ed25d6de8bfb189680e9744c67667d543ee9571c6f069d09d909ae1626374
7
+ data.tar.gz: 2292534f1325467bbf7c435557942d97fec6d0982df6ad1f3bd9ae6cfa6b9bb272a247ec742dfa276d0cbc8b47386dc45be7f1fedd528f68531f79863f7e3757
@@ -1,6 +1,26 @@
1
1
  = Backports --- History
2
2
 
3
- * From 2.5.0: <tt>String#undump</tt> (Note, much slower performances)
3
+ == Version 3.13.0 - April 5th, 2019
4
+
5
+ * Hash
6
+ * +merge+, +merge!+/+update+ (with multiple arguments)
7
+
8
+ == Version 3.12.0 - February 20th, 2019
9
+
10
+ * New Ruby version 2.6.0
11
+ * Array
12
+ * +difference+, +union+
13
+ * +to_h+ (with block)
14
+ * Enumerable
15
+ * +chain+
16
+ * +to_h+ (with block)
17
+ * Enumerator::Chain (use Enumerable#chain)
18
+ * Kernel
19
+ * +then+
20
+
21
+ * Additional backports for 2.5.0:
22
+ * String
23
+ * +undump+
4
24
 
5
25
  == Version 3.11.0 - December 25th, 2017
6
26
 
@@ -87,6 +87,9 @@ Compatible with Ruby itself, JRuby and Rubinius.
87
87
 
88
88
  * Enumerator::Chain (use Enumerable#chain)
89
89
 
90
+ * Hash
91
+ * +merge+, +merge!+/+update+ (with multiple arguments)
92
+
90
93
  * Kernel
91
94
  * +then+
92
95
 
@@ -0,0 +1,3 @@
1
+ fails:Hash#merge! raises a RuntimeError on a frozen instance that is modified
2
+ fails:Hash#merge! checks frozen status before coercing an object with #to_hash
3
+ fails:Hash#merge! raises a RuntimeError on a frozen instance that would not be modified
@@ -0,0 +1,3 @@
1
+ fails:Hash#update raises a RuntimeError on a frozen instance that is modified
2
+ fails:Hash#update checks frozen status before coercing an object with #to_hash
3
+ fails:Hash#update raises a RuntimeError on a frozen instance that would not be modified
@@ -0,0 +1,3 @@
1
+ require 'backports/tools/require_relative_dir'
2
+
3
+ Backports.require_relative_dir
@@ -0,0 +1,28 @@
1
+ require 'backports/tools/alias_method_chain'
2
+
3
+ class Hash
4
+ unless instance_method(:merge).arity < 0
5
+ def merge_with_backports(first = {}, *others, &block)
6
+ merge_without_backports(first, &block).
7
+ merge!(*others, &block)
8
+ end
9
+ Backports.alias_method_chain self, :merge, :backports
10
+ end
11
+
12
+ unless instance_method(:merge!).arity < 0
13
+ def merge_with_backports!(*hashes, &block)
14
+ hashes.each do |h|
15
+ merge_without_backports!(h, &block)
16
+ end
17
+ self
18
+ end
19
+ Backports.alias_method_chain self, :merge!, :backports
20
+ end
21
+
22
+ unless instance_method(:update).arity < 0
23
+ require 'backports/tools/suppress_verbose_warnings'
24
+ Backports.suppress_verbose_warnings do
25
+ alias_method :update, :merge!
26
+ end
27
+ end
28
+ end
@@ -0,0 +1 @@
1
+ require 'backports/2.6.0/hash/merge'
@@ -1,2 +1,4 @@
1
1
  # require this file to load all the backports
2
- require 'backports/2.5.0'
2
+ # NOTE: This is NOT recommended.
3
+ # Best to require the specific backports you need
4
+ require 'backports/2.6.0'
@@ -1,3 +1,3 @@
1
1
  module Backports
2
- VERSION = "3.12.0" unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
2
+ VERSION = "3.13.0" unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
3
3
  end
@@ -145,13 +145,4 @@ class AAA_TestBackportGuards < Test::Unit::TestCase
145
145
  require 'backports/1.8.7/enumerator/next'
146
146
  assert_equal 1, [1,2,3].each.next # [Bug #70]
147
147
  end
148
-
149
- def test_rails
150
- require 'active_support/all'
151
- $stderr.string = '' # disregard warnings by Rails
152
- before = digest
153
- require "backports/rails"
154
- after = digest
155
- assert_nil digest_delta(before, after)
156
- end
157
148
  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.12.0
4
+ version: 3.13.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: 2019-02-20 00:00:00.000000000 Z
11
+ date: 2019-04-05 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.
@@ -18,11 +18,11 @@ executables: []
18
18
  extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
- - .document
22
- - .gitignore
23
- - .gitmodules
24
- - .irbrc
25
- - .travis.yml
21
+ - ".document"
22
+ - ".gitignore"
23
+ - ".gitmodules"
24
+ - ".irbrc"
25
+ - ".travis.yml"
26
26
  - CHANGELOG.rdoc
27
27
  - Gemfile
28
28
  - LICENSE.txt
@@ -128,8 +128,10 @@ files:
128
128
  - frozen_old_spec/tags/1.8.7/core/hash/assoc_spec.rb
129
129
  - frozen_old_spec/tags/1.8.7/core/hash/default_proc_spec.rb
130
130
  - frozen_old_spec/tags/1.8.7/core/hash/keep_if_spec.rb
131
+ - frozen_old_spec/tags/1.8.7/core/hash/merge_spec.rb
131
132
  - frozen_old_spec/tags/1.8.7/core/hash/rassoc_spec.rb
132
133
  - frozen_old_spec/tags/1.8.7/core/hash/select_spec.rb
134
+ - frozen_old_spec/tags/1.8.7/core/hash/update_spec.rb
133
135
  - frozen_old_spec/tags/1.8.7/core/integer/round_spec.rb
134
136
  - frozen_old_spec/tags/1.8.7/core/io/binread_spec.rb
135
137
  - frozen_old_spec/tags/1.8.7/core/io/open_spec.rb
@@ -751,6 +753,9 @@ files:
751
753
  - lib/backports/2.6.0/enumerable.rb
752
754
  - lib/backports/2.6.0/enumerable/chain.rb
753
755
  - lib/backports/2.6.0/enumerable/to_h.rb
756
+ - lib/backports/2.6.0/hash.rb
757
+ - lib/backports/2.6.0/hash/merge.rb
758
+ - lib/backports/2.6.0/hash/update.rb
754
759
  - lib/backports/2.6.0/kernel.rb
755
760
  - lib/backports/2.6.0/kernel/then.rb
756
761
  - lib/backports/2.6.rb
@@ -907,17 +912,16 @@ require_paths:
907
912
  - lib
908
913
  required_ruby_version: !ruby/object:Gem::Requirement
909
914
  requirements:
910
- - - ! '>='
915
+ - - ">="
911
916
  - !ruby/object:Gem::Version
912
917
  version: '0'
913
918
  required_rubygems_version: !ruby/object:Gem::Requirement
914
919
  requirements:
915
- - - ! '>='
920
+ - - ">="
916
921
  - !ruby/object:Gem::Version
917
922
  version: '0'
918
923
  requirements: []
919
- rubyforge_project:
920
- rubygems_version: 2.2.1
924
+ rubygems_version: 3.0.3
921
925
  signing_key:
922
926
  specification_version: 4
923
927
  summary: Backports of Ruby features for older Ruby.