Project

General

Profile

Bug #10504 ยป csv_handle_file_descriptor_gracefully.diff

jackdanger (Jack Danger), 11/13/2014 12:13 AM

View differences:

lib/csv.rb (working copy)
begin
yield csv
ensure
csv.close
csv.closed? || csv.close
end
else
csv
test/csv/test_interface.rb (working copy)
end
end
def test_open_handles_prematurely_closed_file_descriptor_gracefully
assert_nothing_raised(Exception) do
CSV.open(@path) do |csv|
csv.close
end
end
end
### Test Write Interface ###
def test_generate
    (1-1/1)