gestalt 0.0.9 → 0.0.10

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 (3) hide show
  1. data/gestalt.gemspec +1 -1
  2. data/lib/gestalt.rb +6 -3
  3. metadata +2 -2
data/gestalt.gemspec CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  ## If your rubyforge_project name is different, then edit it and comment out
14
14
  ## the sub! line in the Rakefile
15
15
  s.name = 'gestalt'
16
- s.version = '0.0.9'
16
+ s.version = '0.0.10'
17
17
  s.date = '2010-05-12'
18
18
  s.rubyforge_project = 'gestalt'
19
19
 
data/lib/gestalt.rb CHANGED
@@ -5,9 +5,9 @@ require 'formatador'
5
5
 
6
6
  class Gestalt
7
7
 
8
- VERSION = '0.0.9'
8
+ VERSION = '0.0.10'
9
9
 
10
- attr_accessor :calls
10
+ attr_accessor :bindings, :calls
11
11
 
12
12
  def initialize(options = {})
13
13
  options = {
@@ -27,6 +27,7 @@ class Gestalt
27
27
  @traceable_returns << 'c-return'
28
28
  end
29
29
 
30
+ @bindings = []
30
31
  @calls = []
31
32
  @formatador = options['formatador']
32
33
  @stack = []
@@ -73,11 +74,11 @@ class Gestalt
73
74
  def run(&block)
74
75
  Kernel.set_trace_func(
75
76
  lambda do |event, file, line, id, binding, classname|
77
+ @bindings << binding
76
78
  case event
77
79
  when *@traceable_calls
78
80
  call = Gestalt::Call.new(
79
81
  :action => "#{classname}##{id}",
80
- :binding => binding,
81
82
  :location => "#{file}:#{line}"
82
83
  )
83
84
  unless @stack.empty?
@@ -101,6 +102,8 @@ class Gestalt
101
102
  # noop
102
103
  end
103
104
  Kernel.set_trace_func(nil)
105
+ @bindings.pop # pop Kernel#set_trace_func(nil)
106
+ @bindings.pop # pop Gestalt.run
104
107
  @stack.pop # pop Kernel#set_trace_func(nil)
105
108
  unless @stack.empty?
106
109
  @stack.last.children.pop # pop Kernel#set_trace_func(nil)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 9
9
- version: 0.0.9
8
+ - 10
9
+ version: 0.0.10
10
10
  platform: ruby
11
11
  authors:
12
12
  - geemus (Wesley Beary)