<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>thr3a</author_name>
  <author_url>https://blog.hatena.ne.jp/thr3a/</author_url>
  <blog_title>動かざることバグの如し</blog_title>
  <blog_url>https://blog.turai.work/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>やりたいこと Rubyで100〜5000の配列を作成したい。しかもただの配列ではなく100刻みでほしい。 コード 最初はmapメソッドで考えて以下で実行してみた。 (1..50).map { |i| i * 100 } Rubyならもっと便利なビルドインメソッドがあるんじゃないかと思ってAIに聞いてみたら一発でドンピシャな回答をくれた。 (100..5000).step(100).to_a 実行してみるとちゃんと100刻みの100~5000の配列になっている。 irb(main):001&gt; (100..5000).step(100).to_a =&gt; [100, 200, 300, 400, 5…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.turai.work%2Fentry%2F20260603%2F1780413218&quot; title=&quot;Rubyで100刻みの配列を作る方法 - 動かざることバグの如し&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>2026-06-03 00:13:38</published>
  <title>Rubyで100刻みの配列を作る方法</title>
  <type>rich</type>
  <url>https://blog.turai.work/entry/20260603/1780413218</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
