2008-04-02から1日間の記事一覧

Class#superclass が変わってる

上の記事の追記。やっぱり Class#superclass が変化しているようです。これが 1.8.6 の実装。 static VALUE rb_class_superclass(klass) VALUE klass; { VALUE super = RCLASS(klass)->super; if (!super) { rb_raise(rb_eTypeError, "uninitialized class")…

eigenclass of eigenclass / superclass of eigenclass

RHGの逆襲の第3回目の予習ってことでさらに class.c をちらちらみながらRHGの4章とすりあわせていたら、なんだか特異クラスの継承関係が 1.8 からけっこう変化していることに気がつきました。 (eigen.rb) class Object def eigenclass class << self; self; …