<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>xdir (Mnemosyne)</title>
    <link>https://ruby-china.org/xdir</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>有一段 JS 代码不是太明白！</title>
      <description>&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;outerFn&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Outer function&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;innerFn&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Inner function&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;innerFn&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;var fnRef = outerFn();&lt;/code&gt; #=&amp;gt;Outer function&lt;/p&gt;

&lt;p&gt;&lt;code&gt;fnRef();&lt;/code&gt; #=&amp;gt;Inner function
为什么 fnRef 会是 inner function 而不是 outer function&lt;/p&gt;</description>
      <author>xdir</author>
      <pubDate>Mon, 11 Aug 2014 08:58:35 +0800</pubDate>
      <link>https://ruby-china.org/topics/20948</link>
      <guid>https://ruby-china.org/topics/20948</guid>
    </item>
    <item>
      <title>pry 与 rails 自带的 debug 那个好用？</title>
      <description>&lt;p&gt;一般 debug rails 项目用 pry 工具还是 rails 自带的 debug 工具？&lt;/p&gt;</description>
      <author>xdir</author>
      <pubDate>Tue, 22 Jul 2014 08:36:28 +0800</pubDate>
      <link>https://ruby-china.org/topics/20618</link>
      <guid>https://ruby-china.org/topics/20618</guid>
    </item>
  </channel>
</rss>
