rdbc 0.3.3 → 0.3.4

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/rdbc/contract.rb +6 -2
  2. metadata +1 -1
@@ -67,10 +67,14 @@ module Rdbc
67
67
  def method_missing(method, *args)
68
68
  @object_pre = @object.clone
69
69
  send_if_respond_to(@translator.method_pre(method), *args)
70
- result = @object.send(method, *args) rescue result
70
+ result = nil
71
+ begin
72
+ result = @object.send(method, *args)
73
+ rescue StandardError => result
74
+ end
71
75
  send_if_respond_to(:invariant)
72
76
  send_if_respond_to(@translator.method_post(method), result, *args)
73
- raise if result.kind_of?(Exception)
77
+ raise result if result.kind_of?(StandardError)
74
78
  result
75
79
  end
76
80
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdbc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Armin Joellenbeck