<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rubytips86</author_name>
  <author_url>https://blog.hatena.ne.jp/rubytips86/</author_url>
  <blog_title>Ruby Tips!</blog_title>
  <blog_url>https://rubytips86.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>Array#shiftは配列の先頭の要素を取り除くメソッドで、Array#popは配列の末尾の要素を取り除くメソッドだ。 a = [1, 2, 3] p a.shift #=&gt; 1 p a #=&gt; [2, 3] a = [1, 2, 3] p a.pop #=&gt; 3 p a #=&gt; [1, 2] これらのメソッドは、引数に個数を取り、指定した個数だけ配列から要素を取り除ける。なお、この場合の返り値は配列となる。 a = [1, 2, 3] p a.shift(2) #=&gt; [1, 2] p a #=&gt; [3] a = [1, 2, 3] p a.pop(2) #=&gt; [2, 3] p a #=…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubytips86.hatenablog.com%2Fentry%2F2014%2F03%2F19%2F082950&quot; title=&quot;Array#shiftとArray#pop - Ruby Tips!&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>2014-03-19 08:29:50</published>
  <title>Array#shiftとArray#pop</title>
  <type>rich</type>
  <url>https://rubytips86.hatenablog.com/entry/2014/03/19/082950</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
