polyfill 1.5.0 → 1.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: bcb65ec1a2b12eb469ae658312c4ee051659eebc2c98472f405e54bacb056624
4
- data.tar.gz: 7dbe6372b7b71485037aec4c264188f3c82265317191c435de6b5c0847a11f1a
2
+ SHA1:
3
+ metadata.gz: abbe75af7f9dd890000179e6ff1bf1e1b318f80c
4
+ data.tar.gz: b40604b5b2f481a52bd7267611c58087722d369e
5
5
  SHA512:
6
- metadata.gz: 42582e00e4e9c187611589fd8f9a632023ed7514c129bd7be19506f636d778888f626f4d32d943fdd749880eadb800ee2414e2d28e711859946b1966ce3fcd20
7
- data.tar.gz: 6d91941964ac11e86fb11bbf0443b4323872d633c7c2c9a813b7fadfe69705524e13018a3efbef630188395afe6578252ca1da6cb5d5851cf6f4c19de3a42b2d
6
+ metadata.gz: 5eae3186647933600a334c9cc55140ed025c8ff2ba152f6aedad77e43f4fd143e2a05809ff3482f6fd752ea001eba943fe290374cb4b94c08698cd98241c97d9
7
+ data.tar.gz: 32b261215a431459c34dfaaf8728d9d31f3db30b1bf2a49c51f814d75c1246f4a41ec36fcf83964c3998d2a469175c25020f00b6263102b06548eb0d4b345236
@@ -1,5 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 2.6.0
3
4
  - 2.5.3
4
5
  - 2.4.4
5
6
  - 2.3.7
@@ -1,3 +1,10 @@
1
+ # [1.6.0][] (2019-02-01)
2
+
3
+ ## Added
4
+
5
+ - v2.6 Hash#merge
6
+ - v2.5 Kernel#then
7
+
1
8
  # [1.5.0][] (2018-12-30)
2
9
 
3
10
  ## Added
@@ -257,6 +264,7 @@ incorrect type was passed:
257
264
  - v2.4 String#concat?
258
265
  - v2.4 String#prepend?
259
266
 
267
+ [1.6.0]: https://github.com/AaronLasseigne/polyfill/compare/v1.5.0...v1.6.0
260
268
  [1.5.0]: https://github.com/AaronLasseigne/polyfill/compare/v1.4.0...v1.5.0
261
269
  [1.4.0]: https://github.com/AaronLasseigne/polyfill/compare/v1.3.0...v1.4.0
262
270
  [1.3.0]: https://github.com/AaronLasseigne/polyfill/compare/v1.2.0...v1.3.0
@@ -9,6 +9,7 @@ please add it to the documentation.
9
9
 
10
10
  A list of changes can be found at:
11
11
 
12
+ * https://raw.githubusercontent.com/ruby/ruby/v2_6_0/NEWS
12
13
  * https://raw.githubusercontent.com/ruby/ruby/v2_5_0/NEWS
13
14
  * https://raw.githubusercontent.com/ruby/ruby/v2_4_2/NEWS
14
15
  * https://raw.githubusercontent.com/ruby/ruby/v2_3_4/NEWS
data/README.md CHANGED
@@ -17,6 +17,7 @@ monkey patching** that may cause issues outside of your use.
17
17
  - [Polyfill](#polyfill-1)
18
18
  - [Polyfill.get](#polyfillget)
19
19
  - [Implementation Table](#implementation-table)
20
+ - [2.6](#26)
20
21
  - [2.5](#25)
21
22
  - [2.4](#24)
22
23
  - [2.3](#23)
@@ -27,7 +28,7 @@ monkey patching** that may cause issues outside of your use.
27
28
  Add it to your Gemfile:
28
29
 
29
30
  ```ruby
30
- gem 'polyfill', '~> 1.5'
31
+ gem 'polyfill', '~> 1.6'
31
32
  ```
32
33
 
33
34
  Or install it manually:
@@ -125,6 +126,97 @@ end
125
126
  Partial implemented features will be explained in the "Changes" section of the
126
127
  table. The explanation will follow "**Differences:**".
127
128
 
129
+ ### 2.6
130
+
131
+ | | Object | Method | Changes |
132
+ |:-:| ---------------- | -------------------------- | ------- |
133
+ | ✗ | Array | #difference | New
134
+ | ✗ | | #filter | New (alias of `select`)
135
+ | ✗ | | #filter! | New (alias of `select!`)
136
+ | ✗ | | #to_h | Accepts a block that maps elements to new key/value pairs.
137
+ | ✗ | | #union | New
138
+ | ✗ | Binding | #source_location | New
139
+ | ✗ | Coverage | .line_stub | New
140
+ | ✗ | | .result | Accepts new optional keyword arguments, `:clear` and `:stop`.
141
+ | ✗ | | .start | Accepts a new optional keyword argument, `:oneshot_line`.
142
+ | ✗ | Dir | #children | New
143
+ | ✗ | | #each_child | New
144
+ | ✗ | Enumerable | #+ | New
145
+ | ✗ | | #chain | New
146
+ | ✗ | | #filter | New (alias of `select`)
147
+ | ✗ | | #to_h | Accepts a block that maps elements to new key/value pairs.
148
+ | ✗ | Enumerator::Lazy | #filter | New (alias of `select`)
149
+ | ✗ | ENV | #to_h | Accepts a block that maps elements to new key/value pairs.
150
+ | ✗ | ERB | .new | Accepts new optional keyword arguments, `:eoutvar` and `:trim_mode`.
151
+ | ✗ | Exception | #full_message | Accepts new optional keyword arguments, `:highlight` and `:order`.
152
+ | ✗ | File | .binread | Does not invoke external commands even if the path starts with `|`.
153
+ | ✗ | | .binwrite | Does not invoke external commands even if the path starts with `|`.
154
+ | ✗ | | .foreach | Does not invoke external commands even if the path starts with `|`.
155
+ | ✗ | | .read | Does not invoke external commands even if the path starts with `|`.
156
+ | ✗ | | .readlines | Does not invoke external commands even if the path starts with `|`.
157
+ | ✗ | | .write | Does not invoke external commands even if the path starts with `|`.
158
+ | ✗ | FileUtils | #cp_lr | New
159
+ | ✗ | Hash | #filter | New (alias of `select`)
160
+ | ✗ | | #filter! | New (alias of `select!`)
161
+ | ✓ | | #merge | Accepts multiple arguments.
162
+ | ✗ | | #merge! | Accepts multiple arguments.
163
+ | ✗ | | #to_h | Accepts a block that maps elements to new key/value pairs.
164
+ | ✗ | | #update | Accepts multiple arguments.
165
+ | ✗ | Kernel | #BigDecimal | Accepts a new optional keyword argument, `:exception`.
166
+ | ✗ | | #Complex | Accepts a new optional keyword argument, `:exception`.
167
+ | ✗ | | #exec | Does not close non-standard file descriptors.
168
+ | ✗ | | #Float | Accepts a new optional keyword argument, `:exception`.
169
+ | ✗ | | #Integer | Accepts a new optional keyword argument, `:exception`.
170
+ | ✗ | | #Rational | Accepts a new optional keyword argument, `:exception`.
171
+ | ✓ | | #then | New (alias of `yield_self`)
172
+ | ✗ | | #system | Accepts a new optional keyword argument, `:exception`. Does not close non-standard file descriptors.
173
+ | ✗ | KeyError | .new | Accepts new optional keyword arguments, `:receiver` and `:key`.
174
+ | ✗ | Matrix | #[]= | New
175
+ | ✗ | | #antisymmetric? | New
176
+ | ✗ | | #collect! | New
177
+ | ✗ | | #map! | New
178
+ | ✗ | | #skew_symmetric? | New
179
+ | ✗ | Method | #<< | New
180
+ | ✗ | | #>> | New
181
+ | ✗ | Module | #method_defined? | Accepts a second optional argument (default: `true`). If `false`, it only checks the class and not the acestors.
182
+ | ✗ | | #private_method_defined? | Accepts a second optional argument (default: `true`). If `false`, it only checks the class and not the acestors.
183
+ | ✗ | | #protected_method_defined? | Accepts a second optional argument (default: `true`). If `false`, it only checks the class and not the acestors.
184
+ | ✗ | NameError | .new | Accepts new optional keyword arguments, `:receiver` and `:key`.
185
+ | ✗ | Net::HTTP | .new | Accepts a new optional keyword argument, `:write_timeout`.
186
+ | ✗ | | #write_timeout | New
187
+ | ✗ | | #write_timeout= | New
188
+ | ✗ | NilClass | #=~ | New
189
+ | ✗ | NoMethodError | .new | Accepts new optional keyword arguments, `:receiver` and `:key`.
190
+ | ✗ | Numeric | #step | Now returns an instance of the Enumerator::ArithmeticSequence class rather than one of the Enumerator class.
191
+ | ✗ | Object | #=~ | Warns that it is deprecated.
192
+ | ✗ | OpenStruct | #to_h | Accepts a block that maps keys and values to new keys and values.
193
+ | ✗ | Proc | #<< | New
194
+ | ✗ | | #>> | New
195
+ | ✗ | | .call | No longer changes `$SAFE`.
196
+ | ✗ | Random | .bytes | New
197
+ | ✗ | Range | #% | New
198
+ | ✗ | | #=== | Now uses `cover?` instead of `include?`.
199
+ | ✗ | | #cover? | Accepts a Range.
200
+ | ✗ | | #step | Now returns an instance of the Enumerator::ArithmeticSequence class rather than one of the Enumerator class.
201
+ | ✗ | RSS::Parser | .parse | Accepts options as a Hash. Options are `:ignore_unknown_element`, `:parser_class`, and `:validate`.
202
+ | ✗ | Set | #filter! | New (alias of `select!`)
203
+ | ✗ | String | #crypt | Warns that it is deprecated.
204
+ | ✗ | | #split | Yields each substring to a block if given.
205
+ | ✗ | Struct | #filter | New (alias of `select`)
206
+ | ✗ | | #to_h | Accepts a block that maps keys and values to new keys and values.
207
+ | ✗ | Time | #+ | Preserves the timezone.
208
+ | ✗ | | #- | Preserves the timezone.
209
+ | ✗ | | .new | Accepts a timezone object as well as a UTC offset string.
210
+ | ✗ | | #getlocal | Accepts a timezone object as well as a UTC offset string.
211
+ | ✗ | | #succ | Preserves the timezone.
212
+ | ✗ | TracePoint | #enable | Accepts new optional keyword arguments, `:target` and `:target_line`.
213
+ | ✗ | | #eval_script | New
214
+ | ✗ | | #instruction_sequence | New
215
+ | ✗ | | #parameters | New
216
+ | ✗ | Vector | #[]= | New
217
+ | ✗ | | #collect! | New
218
+ | ✗ | | #map! | New
219
+
128
220
  ### 2.5
129
221
 
130
222
  Attempting to modify frozen objects now throws `FrozenError` instead of
@@ -231,3 +231,4 @@ require 'polyfill/v2_2'
231
231
  require 'polyfill/v2_3'
232
232
  require 'polyfill/v2_4'
233
233
  require 'polyfill/v2_5'
234
+ require 'polyfill/v2_6'
@@ -4,7 +4,8 @@ module Polyfill
4
4
  '2.2' => 'V2_2',
5
5
  '2.3' => 'V2_3',
6
6
  '2.4' => 'V2_4',
7
- '2.5' => 'V2_5'
7
+ '2.5' => 'V2_5',
8
+ '2.6' => 'V2_6'
8
9
  }.freeze
9
10
  private_constant :VERSIONS
10
11
 
@@ -0,0 +1,7 @@
1
+ require_relative 'v2_6/hash'
2
+ require_relative 'v2_6/kernel'
3
+
4
+ module Polyfill
5
+ module V2_6
6
+ end
7
+ end
@@ -0,0 +1,19 @@
1
+ module Polyfill
2
+ module V2_6
3
+ module Hash
4
+ def merge(*args)
5
+ if block_given?
6
+ block = ::Proc.new
7
+
8
+ args.each_with_object(dup) do |arg, h|
9
+ h.merge!(arg, &block)
10
+ end
11
+ else
12
+ args.each_with_object(dup) do |arg, h|
13
+ h.merge!(arg)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,13 @@
1
+ module Polyfill
2
+ module V2_6
3
+ module Kernel
4
+ using Polyfill(Kernel: %w[#yield_self], version: '2.5')
5
+
6
+ def then
7
+ return yield_self unless block_given?
8
+
9
+ yield_self(&::Proc.new)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module Polyfill
2
- VERSION = Gem::Version.new('1.5.0'.freeze)
2
+ VERSION = Gem::Version.new('1.6.0'.freeze)
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polyfill
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Lasseigne
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-30 00:00:00.000000000 Z
11
+ date: 2019-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -135,6 +135,9 @@ files:
135
135
  - lib/polyfill/v2_5/string.rb
136
136
  - lib/polyfill/v2_5/struct.rb
137
137
  - lib/polyfill/v2_5/time.rb
138
+ - lib/polyfill/v2_6.rb
139
+ - lib/polyfill/v2_6/hash.rb
140
+ - lib/polyfill/v2_6/kernel.rb
138
141
  - lib/polyfill/version.rb
139
142
  - polyfill.gemspec
140
143
  homepage: ''
@@ -156,7 +159,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
159
  - !ruby/object:Gem::Version
157
160
  version: '0'
158
161
  requirements: []
159
- rubygems_version: 3.0.1
162
+ rubyforge_project:
163
+ rubygems_version: 2.5.2.3
160
164
  signing_key:
161
165
  specification_version: 4
162
166
  summary: Adds newer Ruby methods to older versions.