Paul Robinson wrote in post #1137092:

>   def jumblename
>     #if there is more than one word, reverse each one
>     if @fullname.split(" ").length > 1
>       @fullname = @fullname.split(" ")
>       @fullname.each do |aword|
>         @allwords = @allwords + aword.reverse.capitalize + " "
>       end

@allwords is no initialised, so  @allwords + a...try to addition
something to nil

this is perhaps more rubysh :)

       @allwords = @fullname.split(" ").map {|w|
                  w.reverse.capitalize
                 }.join(" ")

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