Gregory Seidman wrote: > > I repeat, it's a technicality. A string's internal state is held in > variables tied to the particular instance. They are not visible to the Ruby > runtime, however, so they are not listed in the array returned by the > object's instance_variables method. Do you really believe that methods, > which modify those variables, do not change the instance variables simply > because the runtime is unaware of the variables? No, I don't think so. You > are arguing a technicality. > > You may be arguing this technicality because you think it is relevant to > plausible implementations of const objects, and you may be right. Clearly, > any methods that are not entirely implemented in pure Ruby would have to be > explicitly marked as const or not since their const-ness could not be > dicovered automatically. This is not unreasonable, however; extensions are > special cases to begin with. > I don't see any technicality in what David is saying. You might want to try to re-cast your argument in terms that make sense in Ruby. A string in Ruby certainly has internal state, but it certainly does not (in the usual case) have instance variables. Hal