Can’t Change The Value Of Self

The arrival of new offspring understandably inspires a certain amount of fundamental self-reflection. How have I lived my life? Am I a good father? How do I want to live the remainder of my life? Can I better myself?

Can a leopard change its spots? Imagine my surprise when one day, unexpectedly, my Ruby interpreter provided the answer.

[ianmacd@frankincense]$ irb

irb(main):001:0> self = self.better

SyntaxError: compile error

(irb):1: Can't change the value of self

self = self.better

^

from (irb):1

This entry was posted in Ruby. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *