The safest way to do this is using bindvariables. This will eliminate any escaping bugs and security flaws.
Oracle has a decent ruby tutorial for working with ruby. Unfortunately I don't have Oracle installed, so I can't test this this. I'm guessing the following will work though:
cursor = conn.parse('INSERT INTO CSV_TEST VALUES(:gender,:name,:year)')
cursor.bind_param(1,String)
cursor.bind_param(2,String)
cursor.bind_param(3,Fixnum)
CSV.foreach('C:/csv_test.csv') do |row|
gender = row[0]
name = row[1]
year = row[2]
cursor[1] = gender
cursor[2] = name
cursor[3] = year.to_i
cursor.exec
end