ruby-numo / numo-narray

Ruby/Numo::NArray - New NArray class library
http://ruby-numo.github.io/narray/
BSD 3-Clause "New" or "Revised" License
415 stars 41 forks source link

Use File.write in cogen to ensure file is closed #159

Closed bjfish closed 4 years ago

bjfish commented 4 years ago

The current usage of open will not close the file.

eregon commented 4 years ago

@masa16 Thanks for merging! Could you make a release with this fix?

It fixes installing the gem on TruffleRuby (https://github.com/oracle/truffleruby/issues/1989) and makes code generation more reliable (i.e., not rely on a finalizer to close).

deepj commented 4 years ago

@masa16 Hello, is it possible to release a new version with this fix? I'd like to explore more gems on TruffleRuby depend on this . Thank you!