Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #7412

Re: * in { |key, value| value * 2 }

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!not-for-mail
From dreamer <dreamer@panix.com>
Newsgroups comp.lang.ruby
Subject Re: * in { |key, value| value * 2 }
Date Wed, 17 Jul 2019 23:21:49 +0000 (UTC)
Organization PANIX Public Access Internet and UNIX, NYC
Lines 22
Message-ID <qgoaid$r2q$1@reader1.panix.com> (permalink)
References <qfvn84$bp1$1@reader1.panix.com> <qgfilp$q3h$1@dont-email.me> <qgkqde$e57$1@reader1.panix.com> <qgl9ek$bcf$1@dont-email.me>
NNTP-Posting-Host panix2.panix.com
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Trace reader1.panix.com 1563405709 27738 166.84.1.2 (17 Jul 2019 23:21:49 GMT)
X-Complaints-To abuse@panix.com
NNTP-Posting-Date Wed, 17 Jul 2019 23:21:49 +0000 (UTC)
User-Agent tin/2.4.3-20181224 ("Glen Mhor") (UNIX) (NetBSD/7.1.2 (amd64))
Xref csiph.com comp.lang.ruby:7412

Show key headers only | View raw


Doc O'Leary <droleary@2017usenet1.subsume.com> wrote:
> For your reference, records indicate that 
> dreamer <dreamer@panix.com> wrote:
> 
> 
> That’s just the way the update method works.  Its “normal” use is to merge 
> two different hashes, and the block is only run to resolve the case where 
> there are keys that exist in both.  But used against itself, *all* entries 
> will match, and thus be changed by the code in the given block.


Thank you for the clarification.  I appreciate you taking the time to 
respond and give me a better understanding of this.  I'm finding Ruby
intuitive and, may I say, "fun" :)




.------------------( Danny Lee <dreamer@panix.com> )------------------.
I have been impressed with the urgency of doing. Knowing is not enough;
we must apply. Being willing is not enough; we must do. 
                                                    ~ Leonardo da Vinci

Back to comp.lang.ruby | Previous | NextPrevious in thread | Find similar


Thread

* in { |key, value| value * 2 } dreamer <dreamer@panix.com> - 2019-07-08 15:24 +0000
  Re: * in { |key, value| value * 2 } Doc O'Leary  <droleary@2017usenet1.subsume.com> - 2019-07-14 15:44 +0000
    Re: * in { |key, value| value * 2 } dreamer <dreamer@panix.com> - 2019-07-16 15:27 +0000
      Re: * in { |key, value| value * 2 } Doc O'Leary  <droleary@2017usenet1.subsume.com> - 2019-07-16 19:44 +0000
        Re: * in { |key, value| value * 2 } dreamer <dreamer@panix.com> - 2019-07-17 23:21 +0000

csiph-web