<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Majestic Sea Creature - Latest Comments in http://blog.majesticseacreature.com/archives/2008.08/first_post.html</title><link>http://majesticseacreature.disqus.com/</link><description></description><atom:link href="https://majesticseacreature.disqus.com/httpblogmajesticseacreaturecomarchives200808first_posthtml/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 21 Oct 2008 13:59:00 -0000</lastBuildDate><item><title>Re: http://blog.majesticseacreature.com/archives/2008.08/first_post.html</title><link>http://blog.majesticseacreature.com/archives/2008.08/first_post.html#comment-3205487</link><description>&lt;p&gt;I don't think I've ever seen anyone use &amp;lt;&amp;lt;= before, the fact that it works is basically an accident.&lt;/p&gt;&lt;p&gt;It expands out to:&lt;/p&gt;&lt;p&gt;  obj = obj &amp;lt;&amp;lt; other&lt;/p&gt;&lt;p&gt;Which is very confusing:  "Append to this object, then re-assign it"&lt;/p&gt;&lt;p&gt;In this case, if you used that, you'd just be working around the fact that your &lt;a href="http://Hash.new" rel="nofollow noopener" target="_blank" title="Hash.new"&gt;Hash.new&lt;/a&gt; { .. } definition was written incorrectly.&lt;/p&gt;&lt;p&gt;&lt;a href="http://Hash.new" rel="nofollow noopener" target="_blank" title="Hash.new"&gt;Hash.new&lt;/a&gt; { |h,k| h[k] = [] } is idiomatic for these purposes :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gregory Brown</dc:creator><pubDate>Tue, 21 Oct 2008 13:59:00 -0000</pubDate></item><item><title>Re: http://blog.majesticseacreature.com/archives/2008.08/first_post.html</title><link>http://blog.majesticseacreature.com/archives/2008.08/first_post.html#comment-3205344</link><description>&lt;p&gt;Oh, right. You'd have to do archives[e.archive] &amp;lt;&amp;lt;= e as well.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jgn</dc:creator><pubDate>Tue, 21 Oct 2008 13:48:56 -0000</pubDate></item><item><title>Re: http://blog.majesticseacreature.com/archives/2008.08/first_post.html</title><link>http://blog.majesticseacreature.com/archives/2008.08/first_post.html#comment-3204098</link><description>&lt;p&gt;Unfortunately, no, that won't work.&lt;/p&gt;&lt;p&gt;The code you have shown will return an array, that's true, but it never assigns it to the Hash. So a new array will be built every time:&lt;/p&gt;&lt;p&gt;&amp;gt;&amp;gt; a = &lt;a href="http://Hash.new" rel="nofollow noopener" target="_blank" title="Hash.new"&gt;Hash.new&lt;/a&gt; { [] }&lt;br&gt;=&amp;gt; {}&lt;br&gt;&amp;gt;&amp;gt; a[:b]&lt;br&gt;=&amp;gt; []&lt;br&gt;&amp;gt;&amp;gt; a[:b] &amp;lt;&amp;lt; 1&lt;br&gt;=&amp;gt; [1]&lt;br&gt;&amp;gt;&amp;gt; a[:b]&lt;br&gt;=&amp;gt; []&lt;/p&gt;&lt;p&gt;This is why &lt;a href="http://Hash.new" rel="nofollow noopener" target="_blank" title="Hash.new"&gt;Hash.new&lt;/a&gt; passes the hash itself and the key in question into the block. You need to do something with that to persist any data.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gregory Brown</dc:creator><pubDate>Tue, 21 Oct 2008 12:42:29 -0000</pubDate></item><item><title>Re: http://blog.majesticseacreature.com/archives/2008.08/first_post.html</title><link>http://blog.majesticseacreature.com/archives/2008.08/first_post.html#comment-3203361</link><description>&lt;p&gt;Hey, Greg, in self.build_archive_indices(entries) wouldn't this be sufficient?&lt;/p&gt;&lt;p&gt;archives = &lt;a href="http://Hash.new" rel="nofollow noopener" target="_blank" title="Hash.new"&gt;Hash.new&lt;/a&gt; { [] }&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jgn</dc:creator><pubDate>Tue, 21 Oct 2008 12:00:29 -0000</pubDate></item></channel></rss>