Evan Phoenix | 15 May 03:59
Gravatar

Singleton methods on Float and Bignum

In 1.8 (and 1.9 likely), trying to add a singleton method to a Float  
or Bignum raises a TypeError, even though they aren't immediates.

Tracking it back, I see that the function num_sadded contains a comment:

/* Numerics should be values; singleton_methods should not be added to  
them */

Is this still true? Is there a real reason to not allow methods  
singleton methods to be added to Float or Bignum instances?

  - Evan Phoenix


Gmane