From: Bulat Ziganshin Date: 2002-09-27T23:58:48+09:00 Subject: overloading example Hello ruby-talk, from shell.rb: > def pushdir(path = nil) > if iterator? > pushdir(path) > begin > yield > ensure > popdir > end > elsif path > @dir_stack.push @cwd > chdir path > notify "dir stack: [#{@dir_stack.join ', '}]" > self > else > if pop = @dir_stack.pop > @dir_stack.push @cwd > chdir pop > notify "dir stack: [#{@dir_stack.join ', '}]" > self > else > Shell.Fail DirStackEmpty > end > end > end -- Best regards, Bulat mailto:bulatz@integ.ru