Skip to content

Config files not closed properly #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
derks opened this issue Dec 5, 2011 · 2 comments
Closed

Config files not closed properly #3

derks opened this issue Dec 5, 2011 · 2 comments
Assignees

Comments

@derks
Copy link
Member

derks commented Dec 5, 2011

Originally posted here:

http://rubyforge.org/tracker/?func=detail&atid=16730&aid=29461&group_id=4356

(Ruby 1.9.3)

The code:

open(self.config_file).each do |line|

keeps the file open.

Code like:

ParseConfig.new("tmp.ini")
FileUtils.rm "tmp.ini" 

will fail.

Workaround:

open(self.config_file) { |f| f.each do |line|
@ghost ghost assigned derks Dec 5, 2011
@McBen
Copy link

McBen commented Dec 5, 2011

as far as I can tell only ruby 1.9.3 on windoze will fail (ruby 1.9.2 or linux will run fine).

@derks
Copy link
Member Author

derks commented Feb 17, 2012

Thanks for that feedback McBen... regardless I've implemented the change in 0.5.3.

@derks derks closed this as completed Feb 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants