Class: Class
Instance Method Summary collapse
- #to_module ⇒ Object (also: #to_m)
Instance Method Details
#to_module ⇒ Object Also known as: to_m
2 3 4 5 6 7 8 9 10 |
# File 'lib/include/class.rb', line 2 def to_module result = self.clone o = RubyInternal::RObject.new(result.internal_ptr) o.flags &= ~ RubyInternal::FL_SINGLETON o.flags &= ~ RubyInternal::T_MASK o.flags |= RubyInternal::T_MODULE o.klass = Module.internal_ptr.to_i return result end |