<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hungry Machine &#187; Uncategorized</title>
	<atom:link href="http://blog.hungrymachine.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hungrymachine.com</link>
	<description>The guys behind LivingSocial</description>
	<lastBuildDate>Sun, 25 Oct 2009 15:08:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ruby Scoping Bug?</title>
		<link>http://blog.hungrymachine.com/2009/01/28/ruby-scoping-bug/</link>
		<comments>http://blog.hungrymachine.com/2009/01/28/ruby-scoping-bug/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 19:18:48 +0000</pubDate>
		<dc:creator>warren</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.hungrymachine.com/?p=2852</guid>
		<description><![CDATA[class Foo
  def title
    "Oh hai."
  end

  def buggy
    puts title

    if false
      title = 'Oh noes!'
    end

    puts title
  end
end

Foo.new.buggy
This code outputs:
Oh hai.
nil
Isn&#8217;t it odd that the variable being created [...]]]></description>
			<content:encoded><![CDATA[<pre>class Foo
  def title
    "Oh hai."
  end

  def buggy
    puts title

    if false
      title = 'Oh noes!'
    end

    puts title
  end
end

Foo.new.buggy</pre>
<p>This code outputs:</p>
<pre>Oh hai.
nil</pre>
<p>Isn&#8217;t it odd that the variable being created in an if-false block is still being created and set to nil?  Hopefully this is fixed in Ruby 1.9.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hungrymachine.com/2009/01/28/ruby-scoping-bug/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
