This change addresses rubyspec/rubyspec#160 and is based on https://github.com/marcandre/backports/blob/master/lib/backports/1.9.3/file.rb.
I wasn't sure if I should add the spec to this project, or rubyspec, or both? I submitted the PR to rubyspec, let me know if it needs to be submitted here.
Also, my first contributing to rbx, let me know where I got it wrong ;)
Please see the implementation of eg Rubinius.darwin? in the kernel. This needs to follow the same thing.
So, you'll need to add detection for those platforms, but only the ones that Rubinius actually compiles on. I'd be thrilled to see Rubinius running on Amiga, but I don't believe it does, unless you are running it there.
Look at how Rubinius.darwin? is used in FFI.
Finally, this constant should be added in kernel/common not kernel/delta
Thanks for working on this!
Move File::NULL to kernel/common
Perfect. That's exactly what I needed. I tried putting it in kernel/common but RUBY_PLATFORM wasn't defined yet, hence I put it in kernel/delta after it was defined. I knew I was missing something.
I put the new const back in kernel/common and removed those other platforms. I've honestly never used Amiga.
@jstorimer Thanks! One more style issue and we're done! Please set NULL for each value instead of that indented case. That indented multi-line expression is inconsistent with our coding style.
Set NULL for each value instead of indenting case
Done. I also swapped the case for an if since there was only one condition.