<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Hash key rewrite</title>
	<atom:link href="http://www.dweebd.com/ruby/hash-key-rewrite/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dweebd.com/ruby/hash-key-rewrite/</link>
	<description>Web Freshness</description>
	<lastBuildDate>Mon, 05 Jul 2010 23:44:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bill Burcham</title>
		<link>http://www.dweebd.com/ruby/hash-key-rewrite/comment-page-1/#comment-209</link>
		<dc:creator>Bill Burcham</dc:creator>
		<pubDate>Fri, 17 Oct 2008 15:03:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.dweebd.com/?p=56#comment-209</guid>
		<description>Oh yeah. For folks who want to find more of these in the wild, here&#039;s a TextMate regexp that will find all injects that use argument decomposition:

inject.*[&#124;][^&#124;(\n]*[(][^)&#124;\n]+[)][^&#124;\n]*[&#124;]

That makes sense when injecting on anything whose each method yields an array and Hash is a real common one (yielding [key,value]).</description>
		<content:encoded><![CDATA[<p>Oh yeah. For folks who want to find more of these in the wild, here&#8217;s a TextMate regexp that will find all injects that use argument decomposition:</p>
<p>inject.*[|][^|(\n]*[(][^)|\n]+[)][^|\n]*[|]</p>
<p>That makes sense when injecting on anything whose each method yields an array and Hash is a real common one (yielding [key,value]).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: duncanbeevers</title>
		<link>http://www.dweebd.com/ruby/hash-key-rewrite/comment-page-1/#comment-207</link>
		<dc:creator>duncanbeevers</dc:creator>
		<pubDate>Wed, 15 Oct 2008 16:02:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.dweebd.com/?p=56#comment-207</guid>
		<description>A block passed to inject takes two arguments.  The first is the accumulator, and the second is the element of the enumerable being injected (or &lt;a href=&quot;http://en.wikipedia.org/wiki/Foldl&quot; rel=&quot;nofollow&quot;&gt;folded&lt;/a&gt;.)

The decomposition in this case occurs in the second argument of the inject block, which instead of assigning the enumerable element to a single block-local variable, instead decomposes the Hash tuple (key, value) to two discrete locals.  Neat!</description>
		<content:encoded><![CDATA[<p>A block passed to inject takes two arguments.  The first is the accumulator, and the second is the element of the enumerable being injected (or <a href="http://en.wikipedia.org/wiki/Foldl" rel="nofollow">folded</a>.)</p>
<p>The decomposition in this case occurs in the second argument of the inject block, which instead of assigning the enumerable element to a single block-local variable, instead decomposes the Hash tuple (key, value) to two discrete locals.  Neat!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Burcham</title>
		<link>http://www.dweebd.com/ruby/hash-key-rewrite/comment-page-1/#comment-206</link>
		<dc:creator>Bill Burcham</dc:creator>
		<pubDate>Wed, 15 Oct 2008 14:26:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.dweebd.com/?p=56#comment-206</guid>
		<description>That&#039;s a beautiful method. Which part is the &quot;argument decomposition&quot; part? I Googled for &quot;ruby argument decomposition&quot; about all I get is this very post!</description>
		<content:encoded><![CDATA[<p>That&#8217;s a beautiful method. Which part is the &#8220;argument decomposition&#8221; part? I Googled for &#8220;ruby argument decomposition&#8221; about all I get is this very post!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
