Skip to content

Commit

Permalink
Raise if open fails
Browse files Browse the repository at this point in the history
  • Loading branch information
mneumann committed Feb 6, 2012
1 parent 41f7222 commit 10bfadc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/RecordModel/AutoFileReader.rb
Expand Up @@ -3,6 +3,7 @@
class AutoFileReader
def self.open(path, buflen=2**16, &block)
obj = _open(path, buflen)
raise unless obj
if block
begin
block.call(obj)
Expand Down

0 comments on commit 10bfadc

Please sign in to comment.