<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>franklinyu (Franklin Yu)</title>
    <link>https://ruby-china.org/franklinyu</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>Ruby 2.7 (實驗性) 新特性：管道算符</title>
      <description>&lt;p&gt;Ruby 2.7 中即將加入新特性：&lt;a href="https://bugs.ruby-lang.org/issues/15799" rel="nofollow" target="_blank" title=""&gt;管道算符（pipe operator）&lt;/a&gt;。Ruby 2.6：&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;scrap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse_document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load_http&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"http://example.com"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ruby 2.7:&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;load_http&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"http://example.com"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="o"&gt;|&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;parse_document&lt;/span&gt;
  &lt;span class="o"&gt;|&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;scrap&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;此特性早在四月份就併入了主分支；如無意外，會出現在今年聖誕的 2.7 中。Matz 也在推上&lt;a href="https://twitter.com/yukihiro_matz/status/1139419951444271104" rel="nofollow" target="_blank" title=""&gt;徵求大家意見&lt;/a&gt;。可以參照&lt;a href="https://dev.to/baweaver/ruby-2-7-the-pipeline-operator-1b2d" rel="nofollow" target="_blank" title=""&gt;DEV 這個月的文章&lt;/a&gt;。&lt;/p&gt;

&lt;p&gt;話說在那條推上看到了熟悉的 ID……&lt;/p&gt;

&lt;p&gt;注：之前使用了錯誤的例子，經評論提示後改正。謝謝！不過這樣一來這個算符更顯無用……&lt;/p&gt;</description>
      <author>franklinyu</author>
      <pubDate>Fri, 28 Jun 2019 11:48:04 +0800</pubDate>
      <link>https://ruby-china.org/topics/38759</link>
      <guid>https://ruby-china.org/topics/38759</guid>
    </item>
    <item>
      <title>docs.ruby-lang.org 和 ruby-doc.org 的关系？</title>
      <description>&lt;p&gt;我以前一直在用 &lt;a href="https://ruby-doc.org" rel="nofollow" target="_blank"&gt;https://ruby-doc.org&lt;/a&gt;，直到最近才發現 &lt;a href="https://docs.ruby-lang.org/" rel="nofollow" target="_blank"&gt;https://docs.ruby-lang.org/&lt;/a&gt;，這個是官方的文檔麽？所以 Ruby-doc.org 并不是官方的？&lt;/p&gt;</description>
      <author>franklinyu</author>
      <pubDate>Wed, 29 May 2019 02:03:47 +0800</pubDate>
      <link>https://ruby-china.org/topics/38585</link>
      <guid>https://ruby-china.org/topics/38585</guid>
    </item>
  </channel>
</rss>
