<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>keisukefukuda</author_name>
  <author_url>https://blog.hatena.ne.jp/keisukefukuda/</author_url>
  <blog_title>本当は怖いHPC &amp; AI</blog_title>
  <blog_url>https://freak-da.hatenablog.com/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>fault_injection.rbを作っていて、メソッドの定義行を pure ruby で取れないかなと思った。今のところ方法を発見できていない。Procクラスだとto_sでファイルと行番号が含まれるのだが、Methodクラスのto_sメソッドには含まれない。なんだか微妙に理不尽。 # irb irb(main):001:0&gt; Proc.new{}.to_s =&gt; &quot;#&lt;Proc:0x00000000@(irb):1&gt;&quot; irb(main):002:0&gt; class Foo;def foo;end;end irb(main):003:0&gt; Foo.new.mothod(:foo).to_s …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffreak-da.hatenablog.com%2Fentry%2F20080114%2Fp2&quot; title=&quot; メソッドの定義行をpure rubyで取れないかな - 本当は怖いHPC &amp;amp; AI&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-01-14 00:00:01</published>
  <title> メソッドの定義行をpure rubyで取れないかな</title>
  <type>rich</type>
  <url>https://freak-da.hatenablog.com/entry/20080114/p2</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
