Gotchas

elsif clause ignored

x = 2
if x == 1
  puts 'one'
elseif x == 2
  puts 'two'
else
  puts 'many'
end
Output:
many

Explanation:
Because elsif is misspelled, it looks like an ordinary method call. Syntax coloring helped me find this error, because elseif wasn't the same color as the if and else keywords.||

Illegal forward reference

def one
  two
end

one  # Error here!

def two
  puts "success!"
end

one  # This is ok.
Results:
The call to one in the fifth line results in an error message saying that method two is undefined; but if you comment out that line, the call to one in the last line will print "success!".

Explanation:
In Java, method definition happens at compile time; but in Ruby, def is an executable statement; that is, the method gets defined when you execute the def. ||

This is a Gotcha for the Ajax Assignments

If you're running an older version of Firefox you should update it. Older versions have a problme with the onreadystatechange callback. I learned while testing the RSS Reader Assignment that everything was working except the last callback in the callServer_getFeedHTML function. I would get to the loading state and then stop. Once I installed the latest version of Firefox I didn't have any more problems.