title: Get Ruby class name without class method
body: <p>How can I get the class name of an instance of BasicObject in Ruby? For example, say I have this:</p>
  
  <pre><code>class MyObjectSystem &lt; BasicObject
  end
  puts MyObjectSystem.new.class
  </code></pre>
  
  <p>How can I make this code succeed?</p>
  
  <p>EDIT: I've found that Object's instance method <code>class</code> is defined as <code>return rb_class_real(CLASS_OF(obj));</code>. Any way to use this from Ruby?</p>