<?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ではいくつかの演算子はクラスのメソッドとして再定義することが可能です。ということは、演算子式の戻り値を変えてやれば、代入式の評価結果を変更できるんじゃね?と思いたって試してみましたがやはり不可でした。 class Foo def var=(value) return &quot;var=&quot; end def []=(key, value) return &quot;[]=&quot; end end puts &quot;\n--- =&quot; foo = Foo.new puts foo.var=&quot;aaa&quot; puts foo.var=&quot;bbb&quot; puts &quot;\n--- []=&quot; puts foo[&quot;a&quot;]=&quot;aaa&quot; puts f…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Funageanu.hatenablog.com%2Fentry%2F20090810%2F1249909212&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>2009-08-10 22:00:12</published>
  <title> 演算子式の戻り値</title>
  <type>rich</type>
  <url>https://unageanu.hatenablog.com/entry/20090810/1249909212</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
