title: stack level too deep (SystemStackError) while using class_eval ruby
body: <p>Dont understand why I am getting stack level too deep when I run this program. </p>
  
  <pre><code>module A
       class Fruit
  
      def initialize
          puts "pears"
      end
  
      [:orange, :apple].each do |fruit|
          class_eval %Q{
              def #{fruit}
                  puts #{fruit}
              end
          }
      end
  
      puts "pineapple"
  end
  
  a_fruit = Fruit.new
  a_fruit.apple
  end
  
  another_fruit = A::Fruit.new
  another_fruit.orange
  </code></pre>
  
  <p>The output of this program is</p>
  
  <pre><code>(eval):3:in `apple': stack level too deep (SystemStackError)
      from (eval):3:in `apple'
      from testquestion.rb:20
  </code></pre>