Am 22.11.2012 13:07, schrieb ajay paswan:
> 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.

A quick search for the error message shows that
this is a Ruby 1.8 issue...

With Ruby 1.9.3-p194 it works perfectly.


-- 
<https://github.com/stomar/>