contextuality 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,6 +36,7 @@ module Contextuality
36
36
  def contextualize variables = {}, &block
37
37
  ::Thread.current.contextuality.push variables
38
38
  result = block.call
39
+ ensure
39
40
  ::Thread.current.contextuality.pop
40
41
  result
41
42
  end
@@ -1,3 +1,3 @@
1
1
  module Contextuality
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
@@ -90,6 +90,15 @@ describe Contextuality do
90
90
  end
91
91
  end
92
92
 
93
+ context 'exceptions' do
94
+ specify do
95
+ contextualize(:hello => 'world') do
96
+ raise
97
+ end rescue nil
98
+ Contextuality.hello.should == nil
99
+ end
100
+ end
101
+
93
102
  context 'defaults' do
94
103
  before { Contextuality.defaults[:foo] = 'Bar' }
95
104
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contextuality
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-07 00:00:00.000000000 Z
12
+ date: 2012-12-25 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Contextual global variables
15
15
  email: