refining 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/refining.rb +4 -2
- metadata +17 -37
data/lib/refining.rb
CHANGED
@@ -22,11 +22,13 @@ class Module
|
|
22
22
|
def refine_method (meth, &block)
|
23
23
|
return unless block
|
24
24
|
|
25
|
-
old = instance_method(meth) rescue
|
25
|
+
old = instance_method(meth) rescue nil
|
26
26
|
|
27
27
|
define_method(meth) {|*args|
|
28
|
-
instance_exec((old.is_a?(UnboundMethod) ? old.bind(self) : old), *args, &block)
|
28
|
+
instance_exec((old.is_a?(UnboundMethod) ? old.bind(self) : old) || proc {}, *args, &block)
|
29
29
|
}
|
30
|
+
|
31
|
+
old
|
30
32
|
end
|
31
33
|
|
32
34
|
alias refine_module_method refine_singleton_method
|
metadata
CHANGED
@@ -1,65 +1,45 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: refining
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 3
|
10
|
-
version: 0.0.3
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- meh.
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2011-08-13 00:00:00 Z
|
12
|
+
date: 2011-08-14 00:00:00.000000000Z
|
19
13
|
dependencies: []
|
20
|
-
|
21
14
|
description:
|
22
15
|
email: meh@paranoici.org
|
23
16
|
executables: []
|
24
|
-
|
25
17
|
extensions: []
|
26
|
-
|
27
18
|
extra_rdoc_files: []
|
28
|
-
|
29
|
-
files:
|
19
|
+
files:
|
30
20
|
- lib/refining.rb
|
31
21
|
homepage: http://github.com/meh/refining
|
32
22
|
licenses: []
|
33
|
-
|
34
23
|
post_install_message:
|
35
24
|
rdoc_options: []
|
36
|
-
|
37
|
-
require_paths:
|
25
|
+
require_paths:
|
38
26
|
- lib
|
39
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
27
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
40
28
|
none: false
|
41
|
-
requirements:
|
42
|
-
- -
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
|
45
|
-
|
46
|
-
- 0
|
47
|
-
version: "0"
|
48
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
34
|
none: false
|
50
|
-
requirements:
|
51
|
-
- -
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
|
54
|
-
segments:
|
55
|
-
- 0
|
56
|
-
version: "0"
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
57
39
|
requirements: []
|
58
|
-
|
59
40
|
rubyforge_project:
|
60
41
|
rubygems_version: 1.8.6
|
61
42
|
signing_key:
|
62
43
|
specification_version: 3
|
63
44
|
summary: Easily refine methods
|
64
45
|
test_files: []
|
65
|
-
|