From: Robert Klemme Date: 2013-03-21T18:16:13+09:00 Subject: Re: Ruby tainting on primitives On Wed, Mar 20, 2013 at 11:41 PM, Nicolas V. wrote: > I understand now that we cannot taint Fixnums in the current Ruby > implementations. > > My question is whether there is an inherent conceptual reason not to > support this behavior based on the language model Ruby tries to provide. > You said that tainting Fixnums is not possible because Fixnums because > they are implemented as singletons for performance reasons. But this is > an implementation detail, not something that's part of the language > model. It may be an implementation detail in other contexts but when it comes to attaching state to a singleton it is an important feature because all users of the singleton will be affected. > Let me formulate it like this: if I wrote a patch for Ruby to support > tainting Fixnums with no performance overhead, would you accept it, or > do you think tainting Fixnums semantically does not make sense? If not, > why? I would not accept it because of the unwanted side effects. I have explained that in my previous posting. Since you did not react to it I have no idea whether you read or understood it. If not, please do. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/