<?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>class X def self.def_hoges def hoges :hoges end end def_hoges end X.new.hoges # =&gt; :hoges ふと思い付いたので実験してみた。やっぱりできるんだなぁ。つい癖でdefine_methodを使ってしまうのだが。 class X def self.def_hoges def hoges # !&gt; method redefined; discarding old hoges :hoges end end def hoges :old end def_hoges end X.new.hoges # =&gt; :hoges …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubikitch.hatenadiary.org%2Fentry%2F20080323%2F1206254541&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-03-23 15:42:21</published>
  <title>クラスメソッド内でインスタンスメソッドを定義する</title>
  <type>rich</type>
  <url>https://rubikitch.hatenadiary.org/entry/20080323/1206254541</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
