Why this code is giving error:

code is:
CSV.open(filename, 'a') do |csv|
    csv<<[a,b,c,d]
end

Error is:

mode must be 'r', 'rb', 'w', or 'wb'

Note: I want to append.

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