From: "Mark J. Reed" Date: 2004-01-20T08:39:59+09:00 Subject: Re: Help! cannot recursive call On Mon, Jan 19, 2004 at 11:24:11PM +0000, Greg Brondo wrote: > > def chmodDir(ftp, dir) > ftp.chdir(dir) > puts ftp.pwd > ftp.list() do |e| > dir = e.split(/ +/)[8] > if e=~ /^d/ > ftp.chmodDir(ftp, dir) That should be just chmodDir(ftp, dir), no "ftp.". "ftp.chmodDir" tries to call the method chmodDir() on the Net::FTP object, which doesn't exist. You could change your code to define it as a method of class Net::FTP if tha'ts what you want, in which case it would be ftp.chmodDir(dir), but otherwise just lose the "ftp." so you call your own function recursively. -Mark