From: Konrad Meyer Date: 2007-11-03T13:07:46+09:00 Subject: Re: hello world (first method) --nextPart1760569.34fNTpizuZ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Quoth Shuaib Zahda: > I believe so and u need to create an object and call the method using=20 > the object >=20 >=20 > class Test >=20 > def fact > ... > end >=20 > end >=20 > obj =3D Test.new > obj.fact >=20 > I wish this will help Wrong. I don't know what the OP is doing wrong (from the source, he isn't calling= =20 fact() ever. However, defining a method without a class really defines it a= s=20 part of Kernel (which methods can be called without Classname.method). =2D-=20 Konrad Meyer http://konrad.sobertillnoon.com/ --nextPart1760569.34fNTpizuZ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBHK/QQCHB0oCiR2cwRAnEDAKDBlA29FlH/+M3vdA4BjiUXb8F/CwCgoOBf WpgNj95FzPQQhCvtFGGiT1g= =8i/d -----END PGP SIGNATURE----- --nextPart1760569.34fNTpizuZ--