<?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: Rails Metal + Thin = no &#8216;each&#8217; for String?</title>
	<atom:link href="http://mepatterson.net/2010/01/rails-metal-thin-no-each-for-string/feed/" rel="self" type="application/rss+xml" />
	<link>http://mepatterson.net/2010/01/rails-metal-thin-no-each-for-string/</link>
	<description>bestselling author of Devil&#039;s Hand, a supernatural thriller; writer of fictions and web software</description>
	<lastBuildDate>Sun, 29 Jan 2012 11:26:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Joshaven</title>
		<link>http://mepatterson.net/2010/01/rails-metal-thin-no-each-for-string/#comment-258</link>
		<dc:creator>Joshaven</dc:creator>
		<pubDate>Wed, 07 Jul 2010 03:49:26 +0000</pubDate>
		<guid isPermaLink="false">http://digimonkey.com/mepblog/?p=24#comment-258</guid>
		<description>Thank you.  I was having a similar problem and because of you didn&#039;t have to debug for two hours.

I was getting a Time object rather then a string... with Sinatra + Thin</description>
		<content:encoded><![CDATA[<p>Thank you.  I was having a similar problem and because of you didn&#8217;t have to debug for two hours.</p>
<p>I was getting a Time object rather then a string&#8230; with Sinatra + Thin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lory Coloma</title>
		<link>http://mepatterson.net/2010/01/rails-metal-thin-no-each-for-string/#comment-6</link>
		<dc:creator>Lory Coloma</dc:creator>
		<pubDate>Wed, 20 Jan 2010 00:44:21 +0000</pubDate>
		<guid isPermaLink="false">http://digimonkey.com/mepblog/?p=24#comment-6</guid>
		<description>-You can&#039;t really put it any more straightforward than that.</description>
		<content:encoded><![CDATA[<p>-You can&#8217;t really put it any more straightforward than that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: M. E. Patterson</title>
		<link>http://mepatterson.net/2010/01/rails-metal-thin-no-each-for-string/#comment-4</link>
		<dc:creator>M. E. Patterson</dc:creator>
		<pubDate>Mon, 18 Jan 2010 15:03:32 +0000</pubDate>
		<guid isPermaLink="false">http://digimonkey.com/mepblog/?p=24#comment-4</guid>
		<description>Yeah, that was what I thought at first, except I dug into the Thin code and discovered that they have a line:

if @body.is_a?(String)

and then they just yield the whole string instead of trying to break it into chunks.  The other half of the if-else seems to expect that the @body is something that is actually enumerable and yields that back in chunks.  

What I discovered (maybe something new in ActionController 2.3.5?) is that this ActionController BodyWrapper thing gets wrapped around my result, which, because it&#039;s not a String object, makes it fall through to the else and kaboom.  So it&#039;s clear that the Thin guys had attempted to account for 1.9, but I guess something new in ActionController invalidated their fix.  But by turning my plain string into an Array, it made the enumerating part of the else statement enumerate the single element and then it yields it perfectly.  &lt;shrug&gt;  Was easier/more pleasant to make a tiny fix to my code than to hack up Thin.</description>
		<content:encoded><![CDATA[<p>Yeah, that was what I thought at first, except I dug into the Thin code and discovered that they have a line:</p>
<p>if @body.is_a?(String)</p>
<p>and then they just yield the whole string instead of trying to break it into chunks.  The other half of the if-else seems to expect that the @body is something that is actually enumerable and yields that back in chunks.  </p>
<p>What I discovered (maybe something new in ActionController 2.3.5?) is that this ActionController BodyWrapper thing gets wrapped around my result, which, because it&#8217;s not a String object, makes it fall through to the else and kaboom.  So it&#8217;s clear that the Thin guys had attempted to account for 1.9, but I guess something new in ActionController invalidated their fix.  But by turning my plain string into an Array, it made the enumerating part of the else statement enumerate the single element and then it yields it perfectly.  <shrug>  Was easier/more pleasant to make a tiny fix to my code than to hack up Thin.</shrug></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets that mention Rails Metal + Thin = no ‘each’ for String? « me, Patterson -- Topsy.com</title>
		<link>http://mepatterson.net/2010/01/rails-metal-thin-no-each-for-string/#comment-3</link>
		<dc:creator>Tweets that mention Rails Metal + Thin = no ‘each’ for String? « me, Patterson -- Topsy.com</dc:creator>
		<pubDate>Mon, 18 Jan 2010 12:25:44 +0000</pubDate>
		<guid isPermaLink="false">http://digimonkey.com/mepblog/?p=24#comment-3</guid>
		<description>[...] This post was mentioned on Twitter by Nicholas, Matt E. Patterson. Matt E. Patterson said: RT @mepatterson Rails Metal + Thin = no ‘each’ for String? « me, Patterson http://tinyurl.com/ybeaxgq [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Nicholas, Matt E. Patterson. Matt E. Patterson said: RT @mepatterson Rails Metal + Thin = no ‘each’ for String? « me, Patterson <a href="http://tinyurl.com/ybeaxgq" rel="nofollow">http://tinyurl.com/ybeaxgq</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ncancelliere</title>
		<link>http://mepatterson.net/2010/01/rails-metal-thin-no-each-for-string/#comment-2</link>
		<dc:creator>ncancelliere</dc:creator>
		<pubDate>Mon, 18 Jan 2010 12:15:38 +0000</pubDate>
		<guid isPermaLink="false">http://digimonkey.com/mepblog/?p=24#comment-2</guid>
		<description>In Ruby 1.9 String is no longer an enumerable using each().  You can check out this blog post which goes into details about the changes:  http://blog.grayproductions.net/articles/ruby_19s_string

This is probably one of the bigger changes done in Ruby 1.9 ... and I&#039;m guessing Webrick is doing something to work around this, but maybe Thin hasn&#039;t updated to 1.9 yet??</description>
		<content:encoded><![CDATA[<p>In Ruby 1.9 String is no longer an enumerable using each().  You can check out this blog post which goes into details about the changes:  <a href="http://blog.grayproductions.net/articles/ruby_19s_string" rel="nofollow">http://blog.grayproductions.net/articles/ruby_19s_string</a></p>
<p>This is probably one of the bigger changes done in Ruby 1.9 &#8230; and I&#8217;m guessing Webrick is doing something to work around this, but maybe Thin hasn&#8217;t updated to 1.9 yet??</p>
]]></content:encoded>
	</item>
</channel>
</rss>

