From: Konrad Meyer Date: 2007-11-14T14:46:07+09:00 Subject: Re: My hashe is only storing 1 set of values.... --nextPart5024895.NASuOmCiIf Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Quoth Feng Tien: > Dir.foreach(directory) do |f| > @file_sizes =3D {f =3D> File.size(directory+"/"+f)} > end Should be: @file_sizes ||=3D {} Dir.foreach(directory) do |f| @file_sizes[f] =3D File.size(directory + "/" + f) end HTH, =2D-=20 Konrad Meyer http://konrad.sobertillnoon.com/ --nextPart5024895.NASuOmCiIf Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBHOouhCHB0oCiR2cwRAm31AJ9B+wJnj+FfNyfY/tUyxDnZ7f47TQCeMF16 i4N4tkKbHTPl66SYOfJ8+0w= =+mNc -----END PGP SIGNATURE----- --nextPart5024895.NASuOmCiIf--