[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-core
Subject: Re: Wilderness:: The purpose of "ifnone" entry in RHash Structure
From: Mauricio =?iso-8859-1?Q?Fern=E1ndez?= <mfp () acm ! org>
Date: 2005-08-27 9:05:12
Message-ID: 20050827090505.GC24520 () tux-chan
[Download RAW message or body]
On Sat, Aug 27, 2005 at 04:14:24PM +0900, Charles E. Thornton wrote:
> Question: The purpose of "ifnone" entry in RHash Structure.
> Appears to be associated the Procedure Block ?
> Unclear what is going on!
It stores either the default value or the Proc invoked when a
non-existent key is used, in which case the Hash object is flagged
as HASH_PROC_DEFAULT. It's easy to see if you read for instance
rb_hash_initialize and rb_hash_default.
--
Mauricio Fernandez
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic