pluslog 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pluslog.rb +2 -2
- metadata +1 -1
data/lib/pluslog.rb
CHANGED
@@ -8,9 +8,9 @@ end
|
|
8
8
|
def nil.+@
|
9
9
|
klass, name = Thread.current[:method]
|
10
10
|
method = klass.instance_method(name)
|
11
|
-
klass.send(:define_method, name) do |*args|
|
11
|
+
klass.send(:define_method, name) do |*args, &block|
|
12
12
|
Pluslogger.log "enter #{name}"
|
13
|
-
res = Pluslogger.new { method.bind(self).call(*args) }
|
13
|
+
res = Pluslogger.new { method.bind(self).call(*args, &block) }
|
14
14
|
Pluslogger.log "exit #{name}"
|
15
15
|
res
|
16
16
|
end
|