<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>unageanu</author_name>
  <author_url>https://blog.hatena.ne.jp/unageanu/</author_url>
  <blog_title>うなの日記</blog_title>
  <blog_url>https://unageanu.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>Rubyの文字列は「不変でない」んだよな。ということはハッシュのキーとして使った文字列が外部で変更された場合、ハッシュから値を取り出せなくなる場合があるんだよな、とふと思って検証してみたら違っていた。 # 文字列をキーとしてハッシュを作る。 key = &quot;foo&quot; hash = { key=&gt;&quot;value&quot; } puts key puts hash[key] # =&gt; value # キーの値を変更 puts &quot;---&quot; key &lt;&lt; &quot;o&quot; puts key puts hash[key] # キーの値が変わっているので取り出せないはず。 puts hash[&quot;foo&quot;] # ハッシュ内のキー…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Funageanu.hatenablog.com%2Fentry%2F20081116%2F1226828732&quot; title=&quot;ハッシュのキーは文字列でいいのか? - うなの日記&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-11-16 18:45:32</published>
  <title>ハッシュのキーは文字列でいいのか?</title>
  <type>rich</type>
  <url>https://unageanu.hatenablog.com/entry/20081116/1226828732</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
