deprecations 1.0.4 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/deprecations/extension.rb +3 -3
- data/lib/deprecations/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 064a99641237ee41d70976c9c5cafa6dc8a0be84
|
4
|
+
data.tar.gz: 7e7319c47c7a1a139f91f72eb85a118c3af23d36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d310d9d4976fa37ecf45553cb7293b700038b2edd3a55b62b25d7fbae189b7ef7cf17fc0bc038c8ff04365ec12667b0f04792ca8839b093a93ce5d169b2ea279
|
7
|
+
data.tar.gz: e14e5e36289647e13f9d3aac770f7ccac25cfbed20c4f9e9471f8270c4865fc96838a3d1a0421f65859dc9cbd71663720c05e5bcc8483a58ecfb1b06d387bb56
|
data/CHANGELOG.md
CHANGED
@@ -18,7 +18,7 @@ module Deprecations
|
|
18
18
|
decorated = Class === self ? "#{self}." : "#{self.class}#"
|
19
19
|
Deprecations.call(
|
20
20
|
"#{decorated}#{__method__}",
|
21
|
-
alternative
|
21
|
+
UnboundMethod === alternative ? "#{decorated}#{alternative.name}" : alternative,
|
22
22
|
outdated
|
23
23
|
)
|
24
24
|
method.bind(self).call(*a, &b)
|
@@ -37,7 +37,7 @@ module Deprecations
|
|
37
37
|
|
38
38
|
def deprecated(method_name, alternative = nil, outdated = nil)
|
39
39
|
m = __method(method_name) or __method_not_found!(method_name)
|
40
|
-
a = alternative
|
40
|
+
a = Symbol === alternative ? (__method(alternative) or __method_not_found!(alternative)) : alternative
|
41
41
|
__method_deprecated!(m, a, outdated)
|
42
42
|
end
|
43
43
|
end
|
@@ -48,7 +48,7 @@ module Deprecations
|
|
48
48
|
|
49
49
|
def deprecated(method_name, alternative = nil, outdated = nil)
|
50
50
|
m = __method(method_name) or return singleton_class.send(:deprecated, method_name, alternative, outdated)
|
51
|
-
a = alternative
|
51
|
+
a = Symbol === alternative ? (__method(alternative) or __method_not_found!(alternative)) : alternative
|
52
52
|
__method_deprecated!(m, a, outdated)
|
53
53
|
end
|
54
54
|
|
data/lib/deprecations/version.rb
CHANGED