pluslog 0.0.1 → 0.0.2

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.
Files changed (2) hide show
  1. data/lib/pluslog.rb +4 -2
  2. metadata +1 -1
data/lib/pluslog.rb CHANGED
@@ -10,8 +10,9 @@ def nil.+@
10
10
  method = klass.instance_method(name)
11
11
  klass.send(:define_method, name) do |*args|
12
12
  Pluslogger.log "enter #{name}"
13
- Pluslogger.new { method.bind(self).call(*args) }
13
+ res = Pluslogger.new { method.bind(self).call(*args) }
14
14
  Pluslogger.log "exit #{name}"
15
+ res
15
16
  end
16
17
  end
17
18
 
@@ -29,7 +30,8 @@ class Pluslogger
29
30
  def self.new(&block)
30
31
  Thread.current[:depth] ||= 0
31
32
  Thread.current[:depth] += 1
32
- block.call
33
+ res = block.call
33
34
  Thread.current[:depth] -= 1
35
+ res
34
36
  end
35
37
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pluslog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: