From: Joel VanderWerf Date: 2005-10-06T14:31:34+09:00 Subject: Re: foo= ... the only exception to the implicit-self rule ? itsme213 wrote: ... > I find this keeps breaking up an otherwise uniform style in code, and almost > leads me towards abandoning #foo=(value) as a setter, and using #foo(value) > instead (with some distinguished sentinel value to distinguish getter from > setter, which I hate!) You can avoid the sentinal (at a small cost): def foo(*args) case args.size when 1 @foo = args[0] when 0 @foo else raise ArgumentError, "Too many args, #{args.size}" end end -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407