Project

General

Profile

Bug #7528 » test.rb

Simple test case using nil as the non-row value. - SteveW (Stephen Wattam), 12/07/2012 12:04 AM

 
require 'csv'

# Create an empty row
row = CSV::Row.new( [], [] )

# Compare to nil
puts "NIL" if row == nil

# % ruby test.rb
# /usr/lib/ruby/1.9.1/csv.rb:478:in `==': undefined method `row' for nil:NilClass (NoMethodError)
# from test.rb:7:in `<main>'

(1-1/2)