From: Gavin Kistner Date: 2007-12-22T05:04:49+09:00 Subject: Re: Matrix can't be subclassed From: Trans [mailto:transfire@gmail.com] > Matrix can't be subclassed b/c of definitions like this: > > # > # Creates an +n+ by +n+ identity matrix. > # Matrix.identity(2) > # => 1 0 > # 0 1 > # > def Matrix.identity(n) > Matrix.scalar(n, 1) > end > class << Matrix > alias unit identity > alias I identity > end > > It should be: > > def Matrix.identity(n) > scalar(n, 1) > end > class << Matrix > alias unit identity > alias I identity > end > > There are a number of other definitions like this. File a bug, then file a patch. It's easy enough to fix, right? Also, did you intend to write "class << self"? If not, I'm uncertain why you included that second section.