Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The first one is the class' eigenclass. The second one is related to the eigenclass as well, as a method handler:</p> <pre><code>&gt;&gt; def count_classes &gt;&gt; ObjectSpace.count_objects[:T_CLASS] &gt;&gt; end =&gt; nil &gt;&gt; k = count_classes =&gt; 890 &gt;&gt; class A; end =&gt; nil &gt;&gt; puts count_classes - k 2 # eigenclass created here =&gt; nil &gt;&gt; k = count_classes =&gt; 892 &gt;&gt; class A; def self.foo; nil; end; end =&gt; nil &gt;&gt; puts count_classes - k 1 # A/class eigenclass method handler? =&gt; nil &gt;&gt; k = count_classes =&gt; 893 &gt;&gt; class A; def bar; nil; end; end =&gt; nil &gt;&gt; puts count_classes - k 0 # instance method don't count =&gt; nil &gt;&gt; class A; def self.baz; nil; end; end =&gt; nil &gt;&gt; puts count_classes - k 0 # A/eigenclass already has a handler =&gt; nil &gt;&gt; class B &lt; A; end =&gt; nil &gt;&gt; puts count_classes - k 2 # the class and its eigenclass, again =&gt; nil &gt;&gt; class C; end =&gt; nil &gt;&gt; k = count_classes =&gt; 897 &gt;&gt; class C; def foo; end; end =&gt; nil &gt;&gt; puts count_classes - k 0 # so... definitely class method related &gt;&gt; class B; def self.xyz; end; end =&gt; nil &gt;&gt; puts count_classes - k 1 # B/eigenclass handler =&gt; nil &gt;&gt; k = count_classes =&gt; 898 &gt;&gt; a = A.new =&gt; #&lt;A:0x007f810c112350&gt; &gt;&gt; puts count_classes - k 0 =&gt; nil &gt;&gt; def a.zyx; end =&gt; nil &gt;&gt; puts count_classes - k 1 # a/eigenclass handler =&gt; nil </code></pre> <p>I'm not familiar enough with ruby internals to know for sure, but that would be my best guess.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload