backports 3.11.2 → 3.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/backports/rails/kernel.rb +11 -1
- data/lib/backports/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6221e2957392ceef7046212b4700e72a29c465e1
|
4
|
+
data.tar.gz: cb89d81be38cee787dd485539c569b829239f4f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95ed8884c48d73fd8a256a8349b1a6153f87c470b59192a68077007faf20d1060c4eab829e78593551ba83ed2c1167c883c2c06ff35e7c3313add7bbd061c0b9
|
7
|
+
data.tar.gz: 3dfa16f8fb066bddc0aee4258fc0d3d21d23c518570e13a4fb5ce9b202a61768a11d621daf04900533c1343eeedcf7f4785862115263380a203f17e5e463bcb5
|
@@ -4,7 +4,17 @@
|
|
4
4
|
unless Object.method_defined? :try
|
5
5
|
class Object
|
6
6
|
def try(*a, &b)
|
7
|
-
|
7
|
+
if a.empty? || respond_to?(a.first)
|
8
|
+
if a.empty? && block_given?
|
9
|
+
if b.arity == 0
|
10
|
+
instance_eval(&b)
|
11
|
+
else
|
12
|
+
yield self
|
13
|
+
end
|
14
|
+
else
|
15
|
+
public_send(*a, &b)
|
16
|
+
end
|
17
|
+
end
|
8
18
|
end
|
9
19
|
end
|
10
20
|
|
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.11.
|
4
|
+
version: 3.11.3
|
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: 2018-04-
|
11
|
+
date: 2018-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Essential backports that enable many of the nice features of Ruby 1.8.7
|
14
14
|
up to 2.1.0 for earlier versions.
|
@@ -991,7 +991,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
991
991
|
version: '0'
|
992
992
|
requirements: []
|
993
993
|
rubyforge_project:
|
994
|
-
rubygems_version: 2.6.
|
994
|
+
rubygems_version: 2.6.14
|
995
995
|
signing_key:
|
996
996
|
specification_version: 4
|
997
997
|
summary: Backports of Ruby features for older Ruby.
|