<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rubikitch</author_name>
  <author_url>https://blog.hatena.ne.jp/rubikitch/</author_url>
  <blog_title>http://rubikitch.com/に移転しました</blog_title>
  <blog_url>https://rubikitch.hatenadiary.org/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>[ruby-list:45744] 無限ループの回数の取得にてKernel#loopによる無限ループでループの回数を知りたいという質問があった。で、俺はイテレータをwith_index化する魔法のメソッドであるEnumerator#with_indexを使えばいいじゃんと思って試してみたらエラー。ありゃ、Kernel#loopってブロック必須なのか。ブロックなしでEnumerator返すんだと思ってたよ。 loop.with_index do |i| end # ~&gt; -:1:in `loop': no block given (LocalJumpError) # ~&gt; from -:1 [r…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubikitch.hatenadiary.org%2Fentry%2F20081227%2F1230372838&quot; title=&quot;Enumerator#with_indexの落とし穴 - http://rubikitch.com/に移転しました&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2008-12-27 19:13:58</published>
  <title>Enumerator#with_indexの落とし穴</title>
  <type>rich</type>
  <url>https://rubikitch.hatenadiary.org/entry/20081227/1230372838</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
