From: ara.t.howard@... Date: 2005-12-17T05:17:49+09:00 Subject: Re: Math::PI? On Sat, 17 Dec 2005, [ISO-8859-1] Daniel Sch�le wrote: > [..] > >> harp:~ > irb >> irb(main):001:0> Math::constants.grep /pi/i >> => ["PI"] >> irb(main):002:0> Math::PI >> => 3.14159265358979 >> >> hth > > yes, it helps > I am not sure whether I tried Math::PI or Math.PI > also I use Ruby on windows and linux > as I wrote my prevous post I used Ruby on windows > > but it brings up an interessting point > > module A > a=1 > @b=2 > @@c=3 > $d=4 > def e;5;end > def A.f;6;end > end > > A::f is the same as A.f > $d is immediatly accessable > A::e, A.e accessable after include A > > what is about a,b and c? > How can I put a constant in the module? module M A = 42 end module N include M B = 42 end class K include A include B C = 42 end p M::A p N::A p N::B p K::A p K::B p K::C cheers. -a -- =============================================================================== | ara [dot] t [dot] howard [at] noaa [dot] gov | all happiness comes from the desire for others to be happy. all misery | comes from the desire for oneself to be happy. | -- bodhicaryavatara ===============================================================================