Skip to content

Commit

Permalink
hack to prevent closing rio twice
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckremes committed May 2, 2016
1 parent 0b140bf commit ca6e2cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions machine/capi/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ namespace rubinius {

RIO* rio = as_.rio;

if(!rio->f) return true; // might be masking bug where finalizer called twice

if(rio->finalize) rio->finalize(rio, true);

bool ok = (fclose(rio->f) == 0);
Expand Down

0 comments on commit ca6e2cd

Please sign in to comment.