<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rubikitch</author_name>
  <author_url>https://blog.hatena.ne.jp/rubikitch/</author_url>
  <blog_title>http://rubikitch.com/に移転しました</blog_title>
  <blog_url>https://rubikitch.hatenadiary.org/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>2008-05-28 require 'erb' Foo = Struct.new(:foo, :bar) foo = Foo.new('foo', 'bar') ERB.new('&lt;%= foo %&gt; and &lt;%= bar %&gt;').result(foo.instance_eval{binding}) # =&gt; &quot;#&lt;struct Foo foo=\&quot;foo\&quot;, bar=\&quot;bar\&quot;&gt; and bar&quot; これはfooがすでにローカル変数として宣言されているからそっちが優先された話でしょう。 foo.instance_eval { foo } # =&gt; #&lt;struct Foo foo=…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubikitch.hatenadiary.org%2Fentry%2F20080529%2F1212041433&quot; title=&quot;メソッド名と同じローカル変数がある場合はローカル変数が優先される - http://rubikitch.com/に移転しました&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-05-29 15:10:33</published>
  <title>メソッド名と同じローカル変数がある場合はローカル変数が優先される</title>
  <type>rich</type>
  <url>https://rubikitch.hatenadiary.org/entry/20080529/1212041433</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
