<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>round-rand</author_name>
  <author_url>https://blog.hatena.ne.jp/round-rand/</author_url>
  <blog_title>ランドML</blog_title>
  <blog_url>https://ml-rand-note.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>delete_at：位置指定で削除 shift：先頭の要素を削除 pop：末尾の要素を削除 delete：指定した要素を削除 uniq：重複した要素を除去 compact：nilを削除 reject!(delete_if)：条件を満たす要素を削除 select(filter)：条件を満たす要素を抽出 参考 delete_at：位置指定で削除 delete_at(n) でn番目の要素を破壊的に削除します。負のインデックスを指定すれば末尾から位置指定も可能です。 array = [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;] # 2番目の要素 = cを削除 array.delete_at(2) p ar…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fml-rand-note.hatenablog.com%2Fentry%2Fruby%2Farray-delete-elements&quot; title=&quot;【Ruby】配列 削除方法まとめ(delete, shift, pop, compact, reject, select) - ランドML&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-06 00:00:00</published>
  <title>【Ruby】配列 削除方法まとめ(delete, shift, pop, compact, reject, select)</title>
  <type>rich</type>
  <url>https://ml-rand-note.hatenablog.com/entry/ruby/array-delete-elements</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
