From: Clifford Heath Date: 2008-02-08T07:44:57+09:00 Subject: Re: How to use the *args in to_proc ? Phlip wrote: > Jeremy Kemper wrote: > > > > Sure. &:position == :position.to_proc == proc { |element, *args| > > > element.position(*args) } > > > > > > So elements.sort_by(&:position) is shorthand for sorting the > elements by > > > position. > > How would you pass the *args in?? They don't seem to fit on either side > of the &, which is "special" in argument passing syntax... You can't. If you need to, you should hand-roll something like Jeremy's third case. Clifford Heath.