From: Hal Fulton Date: 2004-06-29T02:14:56+09:00 Subject: Re: Is it considered Harmful? Sean O'Dell wrote: >>With just #become (no class=), you can't create objects whose >>#initialize is not called. It's just like swapping variables, except >>all variables that point to the pointee are affected. > > You can't do that with #class= either. You can only call #class= on objects > that exist, hence they've been initialized. The new class might not know > what to do with the object, but the object certainly has already been > initialized. You're missing his point. If I call Array.new, I certainly get an array whose #initialize has been called. But if I then do arr.class = Net::HTTP, then Net:HTTP#initialize does NOT get called (e.g., to set the host name or whatever). Hal