From: 7stud -- Date: 2009-09-17T15:02:48+09:00 Subject: Re: block issues... Bertram Scharpf wrote: > Hi, > > Am Donnerstag, 17. Sep 2009, 09:19:08 +0900 schrieb 7stud --: >> You've named every variable in your program "plugin". Guess what? >> That's confusing. > > By the way: I find myself mixing singular and plural all the time. > I keep discipline with `arg' and `args': > > def meth *args > args.each { |arg| > arg.do_sth > } > end > > But when using hashes I name the variable without concern: > > pets = {} > pets[ :dog] = "gluttonous" > > or > > pet = {} > pet[ :dog] = "gluttonous" > > What do you think is the correct way to cope? > By not doing this: ARGS = {} class Args end def meth *args args.each { |arg| arg.do_sth ARGS[Args.new] = arg(*args) } end -- Posted via http://www.ruby-forum.com/.