highb / pathspec-ruby

Match Path Specifications, such as .gitignore, in Ruby!
Apache License 2.0
23 stars 9 forks source link

Close opened file handle in #from_filename #13

Closed martinandert closed 7 years ago

martinandert commented 7 years ago

We can use the block form of File.open to accomplish that.

codecov-io commented 7 years ago

Codecov Report

Merging #13 into master will increase coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #13      +/-   ##
==========================================
+ Coverage   99.72%   99.72%   +<.01%     
==========================================
  Files           6        6              
  Lines         363      364       +1     
==========================================
+ Hits          362      363       +1     
  Misses          1        1
Impacted Files Coverage Δ
spec/unit/pathspec_spec.rb 100% <100%> (ø) :arrow_up:
lib/pathspec.rb 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 60a4c02...77b136c. Read the comment docs.