<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gan2</author_name>
  <author_url>https://blog.hatena.ne.jp/gan2/</author_url>
  <blog_title>gan2 の Ruby 勉強日記</blog_title>
  <blog_url>https://gan2-2.hatenadiary.org/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>こんな風に使える。 puts &quot;filename: #{__FILE__} 似たようなのに $0 がある。 しかし $0 と __FILE__ は似て非なるもの。 __FILE__ が実行中のプログラムのファイル名を表すのに対し、 $0 は実行するときに指定したプログラムのファイル名を表す。 &gt; ruby hoge.rbのように実行するプログラムが1つの場合は、 __FILE__ と $0 の値は一致する。 しかし、別のプログラムから require したときは、 __FILE__ と $0 は一致しない。 この特徴を利用して、 __FILE__ と $0 はライブラリのサンプルコードによく利…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgan2-2.hatenadiary.org%2Fentry%2F20070520%2F1179649635&quot; title=&quot; __FILE__ は実行中のプログラムのファイル名 - gan2 の Ruby 勉強日記&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>2007-05-20 17:27:15</published>
  <title> __FILE__ は実行中のプログラムのファイル名</title>
  <type>rich</type>
  <url>https://gan2-2.hatenadiary.org/entry/20070520/1179649635</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
