<?xml version="1.0" encoding="UTF-8"?>
<article>
  <body>&lt;html&gt;
&lt;p&gt;&lt;small&gt;This article was migrated from http://rails.office.drecom.jp/takiuchi/archive/167&lt;/small&gt;&lt;/p&gt;
      &lt;p&gt;&#20197;&#19979;&#12399;&#12289;rb_iterate&#12434;&#20351;&#12387;&#12390;Hash&#12434;iterate&#12377;&#12427;&#12467;&#12540;&#12489;&#12391;&#12377;&#12290;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;static VALUE iterator_proc(VALUE Pair, VALUE Arg, VALUE Self){
  VALUE Key = RARRAY(Pair)-&amp;gt;ptr[0];
  VALUE Value = RARRAY(Pair)-&amp;gt;ptr[1];
  return Qnil;
}

rb_iterate(rb_each, Hash, iterator_proc, Arg);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
&lt;code&gt;Hash&lt;/code&gt;&#12399;iterate&#12373;&#12428;&#12427;&#12409;&#12365;Hash&#12289;
&lt;code&gt;Arg&lt;/code&gt;&#12399;&#12452;&#12486;&#12524;&#12540;&#12479;&#12539;&#12502;&#12525;&#12483;&#12463;&#38306;&#25968;&#12395;&#28193;&#12373;&#12428;&#12427;&#20219;&#24847;&#12398;VALUE&#12391;&#12377;&#12290;
&lt;/p&gt;
    &lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
    
      &lt;a id=&quot;BlogEntryExtend&quot;&gt;&lt;/a&gt;
      &lt;span id=&quot;extended-text&quot;&gt;&lt;/span&gt;
    &lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
    &lt;p&gt;&lt;small&gt;This article was migrated from http://rails.office.drecom.jp/takiuchi/archive/167&lt;/small&gt;&lt;/p&gt;
&lt;/html&gt;</body>
  <cached-tag-list></cached-tag-list>
  <comments-count type="integer">0</comments-count>
  <created-at type="datetime">2007-03-06T10:10:00+00:00</created-at>
  <daily-archive-id type="integer">145</daily-archive-id>
  <filter-type>blue_stole</filter-type>
  <id type="integer">112</id>
  <monthly-archive-id type="integer">17</monthly-archive-id>
  <pdf-digest nil="true"></pdf-digest>
  <permalink>/takiuchi/archive/167</permalink>
  <published-at type="datetime">2007-03-06T10:10:00+00:00</published-at>
  <secret>8494cad8-9562-411f-959e-bd7aee84fa29</secret>
  <title>Ruby&#25313;&#24373;&#12398;&#20013;&#12391;Hash&#12434;iterate&#12377;&#12427;&#26041;&#27861;</title>
  <updated-at type="datetime">2008-10-22T20:07:58+00:00</updated-at>
  <user-id type="integer">1</user-id>
</article>
