Improved version:

% # Record separator.
% RS = "\n"
%
% class String
%   # Set regexp for parse_csv.
%   # self is the field-separator
%   def is_fs
%     $csv_re = \
%       %r{ "( (?: [^\\"] | \\")* )" |
%           '( (?: [^\\'] | \\')* )' |
%            ( [^#{self}]+ )
%         }x
%   end
%   def parse_csv
%     raise "Method #is_fs wasn't called." if $csv_re.nil?
%     self.scan( $csv_re ).flatten.compact
%   end
% end
%
% ','.is_fs
%
% # Set Ruby's input record-separator.
% $/ = RS
% 
% ARGF.each_line { | line |
%   p  line.chomp.parse_csv
% }