<?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: TIL: It&#8217;s OK to return nil from to_ary</title>
	<atom:link href="http://tenderlovemaking.com/2011/06/28/til-its-ok-to-return-nil-from-to_ary/feed/" rel="self" type="application/rss+xml" />
	<link>http://tenderlovemaking.com/2011/06/28/til-its-ok-to-return-nil-from-to_ary/</link>
	<description>The act of making love, tenderly.</description>
	<lastBuildDate>Mon, 07 May 2012 22:50:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Robert Pankowecki</title>
		<link>http://tenderlovemaking.com/2011/06/28/til-its-ok-to-return-nil-from-to_ary/comment-page-1/#comment-138143</link>
		<dc:creator>Robert Pankowecki</dc:creator>
		<pubDate>Thu, 30 Jun 2011 07:31:07 +0000</pubDate>
		<guid isPermaLink="false">http://tenderlovemaking.com/?p=545#comment-138143</guid>
		<description>@Ben Hamil : http://floehopper.lighthouseapp.com/projects/22289-mocha/tickets/70
I think lot of people sooner of later comes to this problem.</description>
		<content:encoded><![CDATA[<p>@Ben Hamil : <a href="http://floehopper.lighthouseapp.com/projects/22289-mocha/tickets/70" rel="nofollow">http://floehopper.lighthouseapp.com/projects/22289-mocha/tickets/70</a><br />
I think lot of people sooner of later comes to this problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Ellithorpe</title>
		<link>http://tenderlovemaking.com/2011/06/28/til-its-ok-to-return-nil-from-to_ary/comment-page-1/#comment-138142</link>
		<dc:creator>Josh Ellithorpe</dc:creator>
		<pubDate>Thu, 30 Jun 2011 07:17:57 +0000</pubDate>
		<guid isPermaLink="false">http://tenderlovemaking.com/?p=545#comment-138142</guid>
		<description>This is actually quite useful. I have been using Array() a bit more often after the confident code talk at RailsConf. Simple fix, but I really don&#039;t think Ruby should fire into method_missing for this. If respond_to? is false, that seems pretty explicit.

I am curious however if anything is actually needs this behavior in the wild. If not, we can always propose a change in future versions of Ruby. Nothing is set in stone, till too many people use it.</description>
		<content:encoded><![CDATA[<p>This is actually quite useful. I have been using Array() a bit more often after the confident code talk at RailsConf. Simple fix, but I really don&#8217;t think Ruby should fire into method_missing for this. If respond_to? is false, that seems pretty explicit.</p>
<p>I am curious however if anything is actually needs this behavior in the wild. If not, we can always propose a change in future versions of Ruby. Nothing is set in stone, till too many people use it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Patterson</title>
		<link>http://tenderlovemaking.com/2011/06/28/til-its-ok-to-return-nil-from-to_ary/comment-page-1/#comment-138109</link>
		<dc:creator>Aaron Patterson</dc:creator>
		<pubDate>Wed, 29 Jun 2011 15:39:41 +0000</pubDate>
		<guid isPermaLink="false">http://tenderlovemaking.com/?p=545#comment-138109</guid>
		<description>@Avdi I totally agree.  If I say I don&#039;t respond to to_ary, why is it being called?!?</description>
		<content:encoded><![CDATA[<p>@Avdi I totally agree.  If I say I don&#8217;t respond to to_ary, why is it being called?!?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Avdi Grimm</title>
		<link>http://tenderlovemaking.com/2011/06/28/til-its-ok-to-return-nil-from-to_ary/comment-page-1/#comment-138108</link>
		<dc:creator>Avdi Grimm</dc:creator>
		<pubDate>Wed, 29 Jun 2011 15:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://tenderlovemaking.com/?p=545#comment-138108</guid>
		<description>P.S. On re-read, blurg. I&#039;m kinda surprised Ruby tries THAT hard to get to_ary; it seems like it would have been reasonable to say &quot;look, if you broke respond_to?() we&#039;re not calling your to_ary()&quot;. Especially since I don&#039;t think ANY built-ins or stdlibs violate that expectation.

But it&#039;s good to know def `to_ary; nil end` is the magic &quot;NO SERIOUSLY I DON&#039;T CONVERT&quot; flag.</description>
		<content:encoded><![CDATA[<p>P.S. On re-read, blurg. I&#8217;m kinda surprised Ruby tries THAT hard to get to_ary; it seems like it would have been reasonable to say &#8220;look, if you broke respond_to?() we&#8217;re not calling your to_ary()&#8221;. Especially since I don&#8217;t think ANY built-ins or stdlibs violate that expectation.</p>
<p>But it&#8217;s good to know def `to_ary; nil end` is the magic &#8220;NO SERIOUSLY I DON&#8217;T CONVERT&#8221; flag.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Hamill</title>
		<link>http://tenderlovemaking.com/2011/06/28/til-its-ok-to-return-nil-from-to_ary/comment-page-1/#comment-138096</link>
		<dc:creator>Ben Hamill</dc:creator>
		<pubDate>Wed, 29 Jun 2011 04:35:28 +0000</pubDate>
		<guid isPermaLink="false">http://tenderlovemaking.com/?p=545#comment-138096</guid>
		<description>I ran into this weirdness when RSpec was complaining that some mock object was receiving an unexpected message (to_ary). Somewhere in my code, I had an array of arrays of mocks (or, since it was a simplified unit test, probably just [[mock]]).

Related post: http://yehudakatz.com/2010/01/02/the-craziest-fing-bug-ive-ever-seen/

Seems insane that this exception is used for flow like that. I didn&#039;t know about Array() and to_a. Having gotten into Avdi&#039;s recent material about code confidence and exceptions, I expect that&#039;d be one to bite me sooner or later. Great post, man.</description>
		<content:encoded><![CDATA[<p>I ran into this weirdness when RSpec was complaining that some mock object was receiving an unexpected message (to_ary). Somewhere in my code, I had an array of arrays of mocks (or, since it was a simplified unit test, probably just [[mock]]).</p>
<p>Related post: <a href="http://yehudakatz.com/2010/01/02/the-craziest-fing-bug-ive-ever-seen/" rel="nofollow">http://yehudakatz.com/2010/01/02/the-craziest-fing-bug-ive-ever-seen/</a></p>
<p>Seems insane that this exception is used for flow like that. I didn&#8217;t know about Array() and to_a. Having gotten into Avdi&#8217;s recent material about code confidence and exceptions, I expect that&#8217;d be one to bite me sooner or later. Great post, man.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Turner</title>
		<link>http://tenderlovemaking.com/2011/06/28/til-its-ok-to-return-nil-from-to_ary/comment-page-1/#comment-138093</link>
		<dc:creator>Mark Turner</dc:creator>
		<pubDate>Wed, 29 Jun 2011 02:21:57 +0000</pubDate>
		<guid isPermaLink="false">http://tenderlovemaking.com/?p=545#comment-138093</guid>
		<description>Great little writeup. Thanks Aaron!</description>
		<content:encoded><![CDATA[<p>Great little writeup. Thanks Aaron!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Avdi Grimm</title>
		<link>http://tenderlovemaking.com/2011/06/28/til-its-ok-to-return-nil-from-to_ary/comment-page-1/#comment-138090</link>
		<dc:creator>Avdi Grimm</dc:creator>
		<pubDate>Tue, 28 Jun 2011 23:48:58 +0000</pubDate>
		<guid isPermaLink="false">http://tenderlovemaking.com/?p=545#comment-138090</guid>
		<description>Well that was darned interesting. Thank you!</description>
		<content:encoded><![CDATA[<p>Well that was darned interesting. Thank you!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

