oinkoink wrote:

> The problem is that the tutorial suggests that objects which have
> already been created before a class is modified are affected
> differently from objects which are created after the class is modified.
> 

Ok, let's put it another way. Modifying a class doesn't change two thins
  - instance variables of existing objects
  - anything that is stored in singleton/eigen/meta/whatever class

You can define a method that belongs only to certain object and is not 
stored in the object's class:

class Foo

     def bar
         p "bar"
     end

end

f = Foo.new

# defining a method on an object (it is stored in a special class that 
belongs _only_ to f)

def f.bar
     p "my_bar"
end

# redefining an instance method, class is changed
class Foo

     def bar
     	p "new_bar"
     end

end


# not affected:

f.bar

-> "my_bar"

but new instances will have the new Foo#bar method

recommended reading:
http://www.whytheluckystiff.net/articles/seeingMetaclassesClearly.html

lopex