Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access a toplevel entity in ruby, from inside a module which defines the same name

Tags:

ruby

Inside a module I have a class named Process.

module M
  Process= Class.new
  Process::wait(0)
end

This raises NoMethodError.

How do I access the toplevel Process from inside the module? Is this at all possible, without renaiming my class?

like image 352
johannes Avatar asked Feb 25 '10 15:02

johannes


1 Answers

::Process.wait(0)
like image 153
Farrel Avatar answered Sep 23 '22 17:09

Farrel