backports 3.14.0 → 3.15.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 +4 -4
- data/CHANGELOG.rdoc +5 -0
- data/README.rdoc +6 -0
- data/lib/backports/2.6.0/method.rb +3 -0
- data/lib/backports/2.6.0/method/compose.rb +13 -0
- data/lib/backports/2.6.0/proc.rb +3 -0
- data/lib/backports/2.6.0/proc/compose.rb +19 -0
- data/lib/backports/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfaaf8b4d959d53366fc8ae0651a20195e5f3489db9056f08b25072f7e07c951
|
4
|
+
data.tar.gz: 6febf4408b08ea3be934e88ce8d91534e7cd06acf76684e01dcceb3b27fbd772
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eabe82c6a6c2e7e29b94f7f8c013faeb45a0c5224232fe47bdaab02d9d41ac09543aed1ecf2870a728f6cb517f2c35b6a99682a29a12550a38d9207dabb84403
|
7
|
+
data.tar.gz: dea3961cfcf98e9f5867dc9483ee94d85a94051f393da6a280f3710578cb1bd2a9e91f4bbd65bea08e68c5e8735a7cb2b447201fec57a32e347d37481d4d6164
|
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
unless Proc.method_defined?(:<<) || Proc.method_defined?(:>>)
|
2
|
+
class Proc
|
3
|
+
def <<(g)
|
4
|
+
if lambda?
|
5
|
+
lambda { |*args, &blk| call(g.call(*args, &blk)) }
|
6
|
+
else
|
7
|
+
proc { |*args, &blk| call(g.call(*args, &blk)) }
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def >>(g)
|
12
|
+
if lambda?
|
13
|
+
lambda { |*args, &blk| g.call(call(*args, &blk)) }
|
14
|
+
else
|
15
|
+
proc { |*args, &blk| g.call(call(*args, &blk)) }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/backports/version.rb
CHANGED
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.15.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-
|
11
|
+
date: 2019-05-15 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.
|
@@ -760,6 +760,10 @@ files:
|
|
760
760
|
- lib/backports/2.6.0/hash/update.rb
|
761
761
|
- lib/backports/2.6.0/kernel.rb
|
762
762
|
- lib/backports/2.6.0/kernel/then.rb
|
763
|
+
- lib/backports/2.6.0/method.rb
|
764
|
+
- lib/backports/2.6.0/method/compose.rb
|
765
|
+
- lib/backports/2.6.0/proc.rb
|
766
|
+
- lib/backports/2.6.0/proc/compose.rb
|
763
767
|
- lib/backports/2.6.rb
|
764
768
|
- lib/backports/basic_object.rb
|
765
769
|
- lib/backports/force/array_map.rb
|