From: Emmanuel Touzery Date: 2002-12-13T17:46:48+09:00 Subject: ruby namespaces Hello, I looked in the pickaxe book for details about namespaces, there is mention of modules, but though i'm not sure, I think it's not what I want. Look at this: -----------8<----------------- class Method def initialize() puts "ok" end end Method.new() ------------------------------- ruby -w test.rb test1.rb:7: undefined method `new' for Method:Class (NameError) -------------------------------- If I replace "Method" by "MyMethod", i get as an output "ok". So I conclude that ruby already provides a class named "Method". I would like to still be able to have my own class named "Method", either by wrapping the ruby method in its own namespace, which i would do in C++ say like this: namespace base { # include }; either by putting my own class in a namespace (is it enough? if i'm one "namespace", will my class be preffered to those in the root namespace?). does ruby have such facilities? thank you, emmanuel -- "Stop the world, I want to hop off!" --Guy Bedos