From: Florian Gilcher Date: 2008-03-27T21:30:43+09:00 Subject: Re: Over Loading -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mar 27, 2008, at 10:34 AM, Иван Евтухович wrote: > > > So you can do something like this > def test(arg) > if arg.is_a?(String) > else > end > end > There are some projects out there that allow pattern matching on arguments to some extend. (search for "match" on rubyforge) Basically, they work by defining a proxy method that does the pattern matching and then calling some predefined procs. Essentially, they define this test-Method dynamically. This is not overloading in a strict sense, but it comes close. Greetings Florian Gilcher -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkfrk3MACgkQJA/zY0IIRZZImgCeLw1Db8i/wyhlNP+0jrlXpjUD RaUAn0ecOSw8Qd5wOzmwI/LHkL5rBncb =/pKG -----END PGP SIGNATURE-----