1 comment

[ 2.8 ms ] story [ 10.7 ms ] thread
I don't understand the following guideline:

> Assign struct subclasses so that they can be re-opened.

    Right = Struct.new(:value) do
      def squared; value * value end
    end
    
    class Wrong < Struct.new(:value)
      def squared; value * value end
    end