title: Not Defining Second Method?
body: <p>I want this code to define two methods, <code>nilguard</code> and <code>falseguard</code>, which guard against nil and false values.</p>
  
  <pre><code>Object.class_eval do
    @list = [false, nil]
    @list.each do |i|
      define_method :"#{i}guard" do |other|
        if self == i
          return other
        else
          return self
        end
      end
    end
  end
  </code></pre>
  
  <p>For some reason, it only defines <code>falseguard</code>, which works fine. Why is this, why isn't it defining the other method?</p>