Implement File::NULL #1994

merged 3 commits into from Nov 9, 2012

2 participants


This change addresses rubyspec/rubyspec#160 and is based on

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 ;)

Rubinius member

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!


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.

Rubinius member

@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.


Done. I also swapped the case for an if since there was only one condition.

@brixen brixen merged commit a6389b5 into rubinius:master Nov 9, 2012

1 check failed

Details default The Travis build failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment