"Panagiotis Karvounis" <pkarvou / gmail.com> schrieb im Newsbeitrag 
news:3f57fbe105021813542a7dc211 / mail.gmail.com...
> Hi,I have just started using this great programming language and I am
> testing some features that I use with java.I am testing modules now.
>
> You may find my question very easy, but I hope you can help.
>
> When I run tmp.rb I get the error; "tmp.rb:3: uninitialized constant
> Pdate (NameError)"
>
> Why?

ecause Pdate is not defined on toplevel.  You defined it in module MyTools - 
in this situation a module works like a C++ namespace (or package in Java).

You want either

require "TimeDateTools"

a=MyTools::Pdate.new(25,8,1983)
b=MyTools::Pdate.new(26,5,1986)

if a<=b
 printf("I am younger\n")
else
 printf("I am older\n")
end

or

require "TimeDateTools"
include MyTools

a=MyTools::Pdate.new(25,8,1983)
b=MyTools::Pdate.new(26,5,1986)

if a<=b
 printf("I am younger\n")
else
 printf("I am older\n")
end

Kind regards

    robert