<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>kalasoo (Ming)</title>
    <link>https://ruby-china.org/kalasoo</link>
    <description>Crazy Monster!</description>
    <language>en-us</language>
    <item>
      <title>Array of Array Appending</title>
      <description>&lt;p&gt;&lt;a href="https://gist.github.com/kalasoo/11397964" rel="nofollow" target="_blank" title=""&gt;Gist Link&lt;/a&gt;&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Just found an interesting stuff&lt;/span&gt;

&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[[]]&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;    &lt;span class="c1"&gt;# [[], [], [], []]&lt;/span&gt;
&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;       &lt;span class="c1"&gt;# or x[0] .push 1&lt;/span&gt;
&lt;span class="c1"&gt;# =&amp;gt; [[1], [1], [1], [1]]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[[]]&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;    &lt;span class="c1"&gt;# [[], [], [], []]&lt;/span&gt;
&lt;span class="c1"&gt;# just append an element to the first array of x&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;update：&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;x = [[], [], [], []]
x[0] &amp;lt;&amp;lt; 1
# =&amp;gt; [[1], [], [], []]
&lt;/code&gt;&lt;/pre&gt;</description>
      <author>kalasoo</author>
      <pubDate>Tue, 29 Apr 2014 20:00:54 +0800</pubDate>
      <link>https://ruby-china.org/topics/18920</link>
      <guid>https://ruby-china.org/topics/18920</guid>
    </item>
    <item>
      <title>RJS 有什么明显的危害么？</title>
      <description>&lt;p&gt;第一次用到 rjs 觉得很方便好用，但是又看到了&lt;a href="http://homakov.blogspot.co.uk/2013/05/do-not-use-rjs-like-techniques.html" rel="nofollow" target="_blank" title=""&gt;Do not use RJS-like techniques&lt;/a&gt;，心里面就比较困惑了。&lt;/p&gt;

&lt;p&gt;我不知道到底有没有什么大的问题，诚心求教。&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;补充：&lt;a href="http://homakov.blogspot.co.uk/2013/11/rjs-leaking-vulnerability-in-multiple.html" rel="nofollow" target="_blank" title=""&gt;RJS leaking vulnerability in multiple Rails applications&lt;/a&gt;&lt;/p&gt;</description>
      <author>kalasoo</author>
      <pubDate>Sun, 13 Apr 2014 21:47:54 +0800</pubDate>
      <link>https://ruby-china.org/topics/18580</link>
      <guid>https://ruby-china.org/topics/18580</guid>
    </item>
  </channel>
</rss>
