Skip to content

Commit

Permalink
Merge pull request #16 from ph/fix/close-pattern-file-after-reading
Browse files Browse the repository at this point in the history
close the file after reading the patterns
  • Loading branch information
jordansissel committed Feb 9, 2015
2 parents 26cc993 + 3d7d688 commit f5d84b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion grok.gemspec
Expand Up @@ -5,7 +5,7 @@ Gem::Specification.new do |spec|

#svnrev = %x{svn info}.split("\n").grep(/Revision:/).first.split(" ").last.to_i
spec.name = "jls-grok"
spec.version = "0.10.11"
spec.version = "0.10.12"

spec.summary = "grok bindings for ruby"
spec.description = "Grok ruby bindings - pattern match/extraction tool"
Expand Down
2 changes: 2 additions & 0 deletions lib/grok-pure.rb
Expand Up @@ -79,6 +79,8 @@ def add_patterns_from_file(path)
add_pattern(name, pattern.chomp)
end
return nil
ensure
file.close
end # def add_patterns_from_file

public
Expand Down

0 comments on commit f5d84b1

Please sign in to comment.