On 24.02.2008 14:55, Arlen Cuss wrote:
> You can skip the between and do this:
> 
>>> def add_one(n)
>>> n+1
>>> end
> => nil
>>> [3,6,8].map &method(:add_one)
> => [4, 7, 9]
> 
> Personally, I like doing it this way. You could always try monkey-patching
> (ooh, buzzword) Symbol by adding Symbol#to_proc to do some method
> resolution. Not sure how well it'll work for you, but a guess.

Not necessary.  Here's another approach that has the added advantage 
that it will also work with 1.8 - and it's short and conscise:

irb(main):001:0> add_one = lambda {|x| x + 1}
=> #<Proc:0x7ff9c4bc@(irb):1>
irb(main):002:0> (1..3).map &add_one
=> [2, 3, 4]
irb(main):003:0>

Although I have to say it's not clear to me what speaks against doing
(1..3).map {|x| x + 1}.

Kind regards

	robert