module Q
    module H
      def x ; @x ||= [] ; end
    end
    extend H
  end
  => Q

  class R
    extend Q::H
    def self.x ; @x ||= [] ; super + @x  ; end
    def self.x! ; @x ||= [] ; end
  end
  => nil

  Q.x
  => []

  Q.x << 1
  => [1]

  R.x
  => []

  R.x! << 2
  => [2]

  R.x
  => [2, 2]  # huh?

  Q.x
  => [1]

T.