nhmood / watson-ruby

inline issue manager
MIT License
634 stars 50 forks source link

Not sure if explicit file close is required here [lib/watson/config.rb] #186

Closed nhmood closed 10 years ago

nhmood commented 10 years ago

filename : lib/watson/config.rb line # : 426 tag : review md5 : ae184abbc1e4155a7575a3adb8c2c1b8

     # [review] - Not sure if explicit file close is required here
     _rc = File.open(@rc_file, 'r').read
     _update = File.open(@rc_file, 'w')
             # Keep index to print what line we are on
     # Could fool around with Enumerable + each_with_index but oh well
     _i = 0;
         # Keep track of newlines for prettying up the conf
     _nlc = 0
     _section = ""
         # Fix line endings so we can support Windows/Linux edited rc files
     _rc.gsub!(/\r\n?/, "\n")
     _rc.each_line do | _line |
       # Print line for debug purposes