On Fri, Jul 31, 2009 at 1:07 PM, Prateek Agarwal<prateek.agwl / gmail.com> wrote:
> I am getting the follower
> `+': Range can't be coerced into Fixnum (TypeError)
>
> How to get rid of this?
>

What is your method returning?

def checkforcube(rem)
  if (rem<0)
    return 0
  end
  for i in 1..rem
  if (rem==(i**3))
    return 1
  end
end
end

## For example

check = checkforcube(7)
p check.class
p check



Harry

-- 
A Look into Japanese Ruby List in English
http://www.kakueki.com/ruby/list.html