From: Robert Klemme Date: 2012-11-07T23:03:37+09:00 Subject: Re: How to merge two or more hashes in to one? --14dae93409a941ffeb04cde82f4f Content-Type: text/plain; charset=ISO-8859-1 On Wed, Nov 7, 2012 at 10:34 AM, Jermaine O. wrote: > Jan E. wrote in post #1083271: > > Well, in this case I don't really see the advantage of using sets. The > > only difference it makes is that arr_1 | arr_2 becomes > > set_1.merge(set_2). > > > > So unless you plan to actually use the special features of sets, I'd > > stick with standard arrays. > > > > But I don't want this to turn into yet another endless discussion about > > implementation details, so do whatever you think fits best. > Yeah. I just tend to use Set in situations where the content is supposed to be unique - if not for efficiency reasons then for documentation. > Got the work done and stuck with the merge block approach. Sorry, what did you mean? Are you still stuck or were you stuck? Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ --14dae93409a941ffeb04cde82f4f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


On Wed, N= ov 7, 2012 at 10:34 AM, Jermaine O. <lists@ruby-forum.com> wrote:
Jan E. wrote in post #1083271:
> Well, in this case I don't really see the advant= age of using sets. The
> only difference it makes is that arr_1 | arr_2 becomes
> set_1.merge(set_2).
>
> So unless you plan to actually use the special features of sets, I'= ;d
> stick with standard arrays.
>
> But I don't want this to turn into yet another endless discussion = about
> implementation details, so do whatever you think fits best.
<= /blockquote>

Yeah.=A0 I just tend to use Set in situations where th= e content is supposed to be unique - if not for efficiency reasons then for= documentation.
=A0
Got the work done and stuck with th= e merge block approach.
=A0
Sorry, what did you = mean?=A0 Are you still stuck or were you stuck?

Kind regards

robert



-- =
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
--14dae93409a941ffeb04cde82f4f--