[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Mini-RCR: Extra Argument for Array#join
From:       "Gregory Brown" <gregory.t.brown () gmail ! com>
Date:       2006-12-31 21:38:02
Message-ID: b37300880612311337h648e511bv5be8df6c69587ec7 () mail ! gmail ! com
[Download RAW message or body]

On 12/31/06, Devin Mullins <twifkak@comcast.net> wrote:

>      def test_new_block_behavior
>        assert_equal '1 dna, 2, 3, 4, 5',
>                     (1..5).to_a.join {|e,i| i == 1 ? ' dna, ' : ', ' }
>      end


Hmm... this seems powerful and generally useful.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic