<?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: Fix string memory leaks in Ruby 1.8.6</title>
	<atom:link href="http://blog.toppingdesign.com/2009/09/04/fix-string-memory-leaks-in-ruby-186/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.toppingdesign.com/2009/09/04/fix-string-memory-leaks-in-ruby-186/</link>
	<description>Usability, Information Management, Rails, Javascript &#38; (oh no) Web 2.0</description>
	<lastBuildDate>Tue, 24 Jan 2012 16:32:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: MarkusQ</title>
		<link>http://blog.toppingdesign.com/2009/09/04/fix-string-memory-leaks-in-ruby-186/comment-page-1/#comment-9626</link>
		<dc:creator>MarkusQ</dc:creator>
		<pubDate>Thu, 12 Nov 2009 23:45:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.toppingdesign.com/2009/09/04/fix-string-memory-leaks-in-ruby-186/#comment-9626</guid>
		<description>My bad, I failed to test it thoroughly.  It works for special cases, but what is needed is a &quot;works always.&quot;

-- Markus

P.S. After looking at the C code (and this time testing before I post) I see that File#gets &amp; $_ have the same problem.</description>
		<content:encoded><![CDATA[<p>My bad, I failed to test it thoroughly.  It works for special cases, but what is needed is a &#8220;works always.&#8221;</p>
<p>&#8211; Markus</p>
<p>P.S. After looking at the C code (and this time testing before I post) I see that File#gets &amp; $_ have the same problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MarkusQ</title>
		<link>http://blog.toppingdesign.com/2009/09/04/fix-string-memory-leaks-in-ruby-186/comment-page-1/#comment-9625</link>
		<dc:creator>MarkusQ</dc:creator>
		<pubDate>Thu, 12 Nov 2009 03:01:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.toppingdesign.com/2009/09/04/fix-string-memory-leaks-in-ruby-186/#comment-9625</guid>
		<description>Try something like:

    alias mri_gsub gsub
    def gsub(*args,&amp;block)
         mri_gsub(*args,&amp;block)
    end
 
It handles $1 et al fine.  Also, you should do the same trick with sub, sub!, etc.

-- MarkusQ</description>
		<content:encoded><![CDATA[<p>Try something like:</p>
<p>    alias mri_gsub gsub<br />
    def gsub(*args,&amp;block)<br />
         mri_gsub(*args,&amp;block)<br />
    end</p>
<p>It handles $1 et al fine.  Also, you should do the same trick with sub, sub!, etc.</p>
<p>&#8211; MarkusQ</p>
]]></content:encoded>
	</item>
</channel>
</rss>

