[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Array to Hash

Doan, Alex

5/3/2007 5:51:00 PM

Duplicate array items shouldn't matter b/c your key value is the index
and not the value no?

-----Original Message-----
From: james.d.masters@gmail.com [mailto:james.d.masters@gmail.com]
Sent: Thursday, May 03, 2007 1:45 PM
To: ruby-talk ML
Subject: Re: Array to Hash

On May 3, 10:41 am, james.d.mast...@gmail.com wrote:
> When values are false. Replace condition from "! value" to
> "value.nil?".

Spoke too soon... also when duplicate array items exist...



1 Answer

james.d.masters

5/3/2007 5:59:00 PM

0

On May 3, 10:51 am, "Doan, Alex" <alex.d...@wachovia.com> wrote:
> Duplicate array items shouldn't matter b/c your key value is the index
> and not the value no?

You're right... I had it mixed up. Which begs to question (to the
original poster), what is the motivation for converting to hash? Out
of curiousity...