Ammar Ali wrote in post #1136869:
> On Feb 16, 2014, at 10:50 PM, Arup Rakshit <lists / ruby-forum.com> wrote:

> With a block you can accept one or two arguments. To convert based on
> the header name, or index, you want to specify a block with two
> arguments to get the field info:
>

Why CSV#convert not working here ?

require 'csv'

str = CSV.generate('Hello', :converters => :nonewline, :headers => true 
) do |csv|
  csv.convert {|s| s.downcase }
end
str # => "Hello"

I expect the output as "hello"

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