rubinius/rubinius — pull request #3077 by YorickPeterse (2014-06-30 10:05:07+00:00)
Title: Guards for BasicObject when coercing types

This PR adds a set of guards for BasicObject when using method such as `Kernel.Float` and `Kernel.Hash`. MRI has special handling for BasicObject. Rubinius didn't and would raise NoMethodError erorrs instead. This PR also includes an extra guard for the second argument of `Kernel.Rational`.

I'm not merging this straight in as I'd like to have some feedback on this matter first. The guards have to be added there in the end but I'm curious if there's perhaps a better way of doing things (or just a more preferred way).