Gerardo Santana Góíez Garrido wrote: > Chand Perrin wrote: >> What would you expect it to return, and why would you think that should >> be the expected behavior? > > I'd expect the same behavior as FalseClass and TrueClass: undefined method. > > Because if I want 0 would expect or send 0, not nil.to_i. > Because it doesn't make sense to me that nil, which means false also, > can be represented as zero, when zero doesn't mean false, but true. Hmmm. Why would you convert a variable/parameter to int if you want to use it in a boolean context, in the first place?... Do you think that to_i is expected to keep the boolean meaning of anything it's sent to, or throw an exception? I don't see why this would ever be related to each other (to_i and boolean operations). > mortee wrote: >> Well, if you'd like it so much, why not just redefine it in your own >> programs? Everyone else seems to expect it to return 0 instead of being >> hostile by throwing an exception... > > Oh, c'mon ... For some weird reason, I don't *exactly* understand your counter-argument. mortee