[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

[Basic?] hash changing one key only ?

pere.noel

6/13/2006 8:50:00 AM

saying i do have a hash "numbers" like that :

numbers = {
"one" => 1,
"two" => 2,
"three" => 3
}

i want to translate two only into german in order to get :

numbers = {
"one" => 1,
"zwei" => 2,
"three" => 3
}

what's the best way to do that ?

does i need to do something like :

tmp_value=numbers["two"]

numbers.delete("two")

numbers["zwei"]=tmp_value

or does exist a simpler more rubyish approach ???
--
une bévue
10 Answers

Premshree Pillai

6/13/2006 12:41:00 PM

0

Une bévue wrote:
> tmp_value=numbers["two"]
>
> numbers.delete("two")
>
> numbers["zwei"]=tmp_value

delete() returns a value object, so you don't need a temporary
variable. The following should do:

numbers["zwei"] = numbers.delete("two")

Premshree

pere.noel

6/13/2006 1:50:00 PM

0

Premshree <premshree.pillai@gmail.com> wrote:

>
> delete() returns a value object, so you don't need a temporary
> variable. The following should do:
>
> numbers["zwei"] = numbers.delete("two")

fantastic, much more rubyisch, thanks a lot !!!
--
une bévue

RabbiJoekerr

1/13/2010 3:09:00 AM

0

On Jan 12, 12:24 am, Aviroce <dudaras...@gmail.com> wrote:
> On Jan 11, 9:18 pm, Majd al-Din <Is...@Sucks.com> wrote:
>
> > spammer wrote:
> > > FUCK ISLAM!
>
> > You must be very very hard up.
>
> Since he has nothing to do it with, he can redirect that on his own
> back, middle hole.

Once again avi-cockroach spins it into one of his gay fantasies
bwahahahar!

RabbiJoekerr

1/13/2010 3:11:00 AM

0

On Jan 12, 12:28 am, Aviroce <dudaras...@gmail.com> wrote:
Snip avi-cockroach admitting he's never read the talmud bwahahahahr!Poor blithering idiot all you can do is post fake resumes about all of
the jobs you were never even considered for bwahahahahar!!!

>
> On Jan 10, 2:49 pm, RabbiJoekerr <jokersotherm...@yahoo.com> wrote:
>
> > On Jan 8, 4:27 am, Aviroce <dudaras...@gmail.com> wrote:
> > Snip coward Aviroce admitting he has no clue about economics nor
> > politics nor reality in general!

RabbiJoekerr

1/14/2010 2:56:00 AM

0

On Jan 12, 10:20 pm, Aviroce <dudaras...@gmail.com> wrote:
Snip avi-cockroach admitting that was him in the video

RabbiJoekerr

1/14/2010 3:06:00 AM

0

On Jan 12, 10:24 pm, Aviroce <dudaras...@gmail.com> wrote:
> My resumes are not your Talmuds.

Right your resumes are filled with lies which is why you cant find a
job! BWAHAHAHAHAHAR!





 Your Talmuds are loaded with filth
> and illegal acts.

Yaaaawn that lie was disproven long ago.... too bad you're not
intelligent enough to see how stupid you are for repeating it!




So about your prison... ooops education record... just how did you end
up so stupid?

NefeshBarYohai

1/14/2010 4:07:00 AM

0

On Jan 13, 8:06 pm, RabbiJoekerr <jokersotherm...@yahoo.com> wrote:
> On Jan 12, 10:24 pm, Aviroce <dudaras...@gmail.com> wrote:
>
> > My resumes are not your Talmuds.
>
> Right your resumes are filled with lies which is why you cant find a
> job! BWAHAHAHAHAHAR!
>
>   Your Talmuds are loaded with filth
>
> > and illegal acts.
>
> Yaaaawn that lie was disproven long ago.... too bad you're not
> intelligent enough to see how stupid you are for repeating it!
>
> So about your prison... ooops education record... just how did you end
> up so stupid?

RabbiJoekerr I'm on your side. It is strange how there are people
like me that at 54 years old would still love to have a Jewish Yeshiva
Education and I've been receiving one in my dreams. I dream all the
time about being in the IDF, being on Kibuttezim and being in
Yeshivas. These are always good dreams, but then there are people
that are close-minded and misinformed suffering from the hate that
kills our enemies the hatred of Jews. My mother and father always
taught me that our fellow Jews are to be loved because G-d tells us
that in His Torah. It is too bad that those that hate us can’t
comprehend the goodness in each and every Jew.

RabbiJoekerr

1/15/2010 5:16:00 AM

0

On Jan 13, 11:06 pm, NefeshBarYohai <tach...@hotmail.com> wrote:
> On Jan 13, 8:06 pm, RabbiJoekerr <jokersotherm...@yahoo.com> wrote:
>
>
>
> > On Jan 12, 10:24 pm, Aviroce <dudaras...@gmail.com> wrote:
>
> > > My resumes are not your Talmuds.
>
> > Right your resumes are filled with lies which is why you cant find a
> > job! BWAHAHAHAHAHAR!
>
> >   Your Talmuds are loaded with filth
>
> > > and illegal acts.
>
> > Yaaaawn that lie was disproven long ago.... too bad you're not
> > intelligent enough to see how stupid you are for repeating it!
>
> > So about your prison... ooops education record... just how did you end
> > up so stupid?
>
> RabbiJoekerr I'm on your side.  It is strange how there are people
> like me that at 54 years old would still love to have a Jewish Yeshiva
> Education and I've been receiving one in my dreams.  I dream all the
> time about being in the IDF, being on Kibuttezim and being in
> Yeshivas.  These are always good dreams, but then there are people
> that are close-minded and misinformed suffering from the hate that
> kills our enemies the hatred of Jews.  My mother and father always
> taught me that our fellow Jews are to be loved because G-d tells us
> that in His Torah.  It is too bad that those that hate us can’t
> comprehend the goodness in each and every Jew.

Natan Shcharansky was in his40's when he under went IDF training
wasn't he? Maybe you can too!
living in a kibbutzim could be harsh for you unless you have the right
skills... but if it's a part of your soul thaen you will succeed!

RabbiJoekerr

1/15/2010 5:17:00 AM

0

On Jan 14, 9:53 pm, Aviroce <dudaras...@gmail.com> wrote:
Snip, avicockroach identifying himself as a gay idiot

RabbiJoekerr

1/15/2010 5:18:00 AM

0

On Jan 14, 10:00 pm, Aviroce <dudaras...@gmail.com> wrote:
> There are animals only their mothers cares for them.  They are too
> ugly.
Wow Avicockroach describes himself!