Closed jlawler closed 14 years ago
Fix File.readlink. Closed by 9e5b900b98c6db280289239c4b97e1ae7ed91319.
FFI used to be able to manipuate a String objects insides, thats how this method expected to work. We removed that functionality at some time in the past because it's too hard to make work properly (and it's not compatible with ruby-ffi).
The proper way is to use an explicit MemoryPointer and read the data back out of it, as is done here.
Given the fact that File.readlink directly maps to POSIX.readlink, I would guess this is a problem with ffi. I am unable to follow it any further than I have without digging into ffi code.