Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test diamonds: reduce needless converters #205

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/datasets/ggplot2-dataset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def each
data_path = cache_dir_path + data_base_name
data_url = "#{download_base_url}/data-raw/#{data_base_name}"
download(data_path, data_url)
CSV.open(data_path, headers: :first_row, converters: :all) do |csv|
CSV.open(data_path, headers: :first_row, converters: :numeric) do |csv|
record_class = self.class::Record
csv.each do |row|
record = record_class.new(*row.fields)
Expand Down