From: Hassan Schroeder Date: 2011-10-18T08:24:11+09:00 Subject: Re: How to use a method inside a block On Mon, Oct 17, 2011 at 4:10 PM, Eqbal Quran wrote: > (1..5).each do |n| >  mult(n,2) > end > > def mult(x,y) >  x*y > end > > I keep getting undefined method ‘mult’ for main:Object You're calling your method before you've defined it. -- Hassan Schroeder ------------------------ hassan.schroeder@gmail.com http://about.me/hassanschroeder twitter: @hassan