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 +5 -5
- data/.travis.yml +1 -0
- data/CHANGELOG.md +8 -0
- data/CONTRIBUTING.md +1 -0
- data/README.md +93 -1
- data/lib/polyfill.rb +1 -0
- data/lib/polyfill/internal_utils.rb +2 -1
- data/lib/polyfill/v2_6.rb +7 -0
- data/lib/polyfill/v2_6/hash.rb +19 -0
- data/lib/polyfill/v2_6/kernel.rb +13 -0
- data/lib/polyfill/version.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: abbe75af7f9dd890000179e6ff1bf1e1b318f80c
|
4
|
+
data.tar.gz: b40604b5b2f481a52bd7267611c58087722d369e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5eae3186647933600a334c9cc55140ed025c8ff2ba152f6aedad77e43f4fd143e2a05809ff3482f6fd752ea001eba943fe290374cb4b94c08698cd98241c97d9
|
7
|
+
data.tar.gz: 32b261215a431459c34dfaaf8728d9d31f3db30b1bf2a49c51f814d75c1246f4a41ec36fcf83964c3998d2a469175c25020f00b6263102b06548eb0d4b345236
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -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
|
data/CONTRIBUTING.md
CHANGED
@@ -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.
|
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
|
data/lib/polyfill.rb
CHANGED
@@ -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
|
data/lib/polyfill/version.rb
CHANGED
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.
|
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:
|
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
|
-
|
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.
|