Matz wrote:
> What behavior suprises you least?

Hmm, I was aware of the style of returning subclass types from superclass
operations, but I must admit it did surprise me to receive a broken object
of my subclass type from a built-in. (My own code does that frequently, but
those are bugs!)

It would not surprise me if

  1.  I received an object of the superclass type (String, in my example).
  2.  I received a non-broken object of my subclass type.

Outcome (1) is natural and correct, but boring.
Outcome (2) might be impossible to do in the general case.

But my surprise shouldn't really be the primary issue -- the issue of
correctness of the Ruby language is far more important.

Sorry, I'm having a hard time accepting that it's okay for operations to
produce broken objects.


Bob