<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>spitfire_tree</author_name>
  <author_url>https://blog.hatena.ne.jp/spitfire_tree/</author_url>
  <blog_title>happy lie, happy life</blog_title>
  <blog_url>https://spitfire-tree.hatenadiary.org/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>Ruby のような言語を使っていると値渡しと参照渡しなどという概念もあまり意識しませんが、配列の代入は面白い挙動をするので備忘録として残しておきます。確認は Ruby 1.9.2 p290 を使い Max OS SnowLeopard で行いました。まず String 型を別の変数に代入した際の挙動を確認。 str = &quot;test&quot; str_copy = str str_copy += &quot;test&quot; この時 str には &quot;test&quot; が str_copy には &quot;testtest&quot; が代入されています。一方で Array の場合。 ary = [] ary_copy = ary ary_co…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fspitfire-tree.hatenadiary.org%2Fentry%2F20120127%2F1327647946&quot; title=&quot;Ruby の配列を別の変数に代入した際の挙動 - happy lie, happy life&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>2012-01-27 16:05:46</published>
  <title>Ruby の配列を別の変数に代入した際の挙動</title>
  <type>rich</type>
  <url>https://spitfire-tree.hatenadiary.org/entry/20120127/1327647946</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
