unimidi 0.1.2-i686-linux → 0.1.3-i686-linux

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,11 +17,15 @@ module UniMIDI
17
17
 
18
18
  # enable the device for use, can be passed a block to which the device will be passed back
19
19
  def open(*a, &block)
20
- begin
21
- @device.open(*a)
22
- block.nil? ? self : block.call(self)
23
- ensure
24
- close
20
+ @device.open(*a)
21
+ unless block.nil?
22
+ begin
23
+ block.call(self)
24
+ ensure
25
+ close
26
+ end
27
+ else
28
+ self
25
29
  end
26
30
  end
27
31
 
data/lib/unimidi.rb CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  module UniMIDI
8
8
 
9
- VERSION = "0.1.2"
9
+ VERSION = "0.1.3"
10
10
 
11
11
  end
12
12
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: unimidi
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.2
5
+ version: 0.1.3
6
6
  platform: i686-linux
7
7
  authors:
8
8
  - Ari Russo