15 May 03:59
Singleton methods on Float and Bignum
From: Evan Phoenix <evan <at> fallingsnow.net>
Subject: Singleton methods on Float and Bignum
Newsgroups: gmane.comp.lang.ruby.core
Date: 2008-05-15 02:02:41 GMT
Subject: Singleton methods on Float and Bignum
Newsgroups: gmane.comp.lang.ruby.core
Date: 2008-05-15 02:02:41 GMT
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
RSS Feed