From: Dave Thomas Date: 2001-03-06T15:11:35+09:00 Subject: [ruby-talk:12095] Re: Another hook matz@zetabits.com (Yukihiro Matsumoto) writes: > |If we're in to hooks, there's another that might be useful: > | > | to_bool: > | analogous to to_s, called whenever an object is used in a context > | that requires a boolean value (this one came up on > | #ruby-lang). Masochists could use this to emulate Perl > > And performance would be the excuse again. Would it be that bad in reality? You'd only have to do the call if to_bool was defined anywhere, so for programs that didn't use it it would only be a single instruction added to the path. I'm sure we can find one to take away somewhere to compensate... :) Dave