The 'i' in your method is local to the method.  It is not the same 'i' 
as outside the method.

Instead, do

 def add(i,j)
   i = i + j
 end

   i = 1

   puts i
    i = add(i,3)
   puts i


-- 
Posted via http://www.ruby-forum.com/.