From: Matthew Moss Date: 2007-06-15T06:40:08+09:00 Subject: Re: severe newbie question (class, fixnum, array) > class Thread I would say this is a bad idea, since I believe Thread is a core class. Call it MyThread, or ThreadDesc or something else. > def initialize number > @number = number ; # > @replies = 0 ; > end ; # initialize Get rid of all the semicolons; they are usually not needed. > def filename > dirname = "./data/" ; # the directory where the files are kept > filename = dirname + @number.toS + "-" + @replies.toS + ".html" > return filename > end ; # filename toS is not an existing method, but to_s is. Use that, or do this which is more compact: def filename "./data/#{@number}-#{@replies}.html" end Couple things here: 1. return is not necessary, as functions return the last evaluation. 2. #{ ... } within a string evaluates what is inside the curlies, and embeds that in the string. > thread[1727] = Thread.new 1727 You'll need to create the array first: thread = [] or thread = Array.new