From: "Mauricio Fernández" Date: 2003-06-27T15:00:20+09:00 Subject: Re: method overloading? On Fri, Jun 27, 2003 at 02:12:47PM +0900, Donglai Gong wrote: > Yes, this would solve the problem but it's not ideal or elegant, the > code is now much less obvious. > > For example: > > class Bank > def open(safe, combination) > ... > end > > def open(window) > ... > end > end Why not class Bank def open_safe(safe, combination) ... end def open_window(window) ... end end I use this for constructors all the time. -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com 'Ooohh.. "FreeBSD is faster over loopback, when compared to Linux over the wire". Film at 11.' -- Linus Torvalds