Project

General

Profile

Feature #30356 ยป remove-code-for-ruby-two-point-two.diff

Go MAEDA, 2019-02-03 06:54

View differences:

Gemfile (working copy)
10 10
gem "roadie-rails", "~> 1.3.0"
11 11
gem "mimemagic"
12 12
gem "mail", "~> 2.7.1"
13
gem "csv", "~> 3.0.1" if RUBY_VERSION >= "2.3" && RUBY_VERSION < "2.6"
13
gem "csv", "~> 3.0.1" if RUBY_VERSION < "2.6"
14 14

  
15
gem "nokogiri", (RUBY_VERSION >= "2.3" ? "~> 1.10.0" : "~> 1.9.1")
15
gem "nokogiri", "~> 1.10.0"
16 16
gem "i18n", "~> 0.7.0"
17 17

  
18 18
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
app/controllers/imports_controller.rb (working copy)
50 50
      redirect_to import_mapping_path(@import)
51 51
    end
52 52

  
53
  # TODO: Remove ArgumentError when support for Ruby 2.2 is dropped (#28689)
54
  rescue CSV::MalformedCSVError, ArgumentError, EncodingError => e
53
  rescue CSV::MalformedCSVError, EncodingError => e
55 54
    if e.is_a?(CSV::MalformedCSVError) && e.message !~ /Invalid byte sequence/
56 55
      flash.now[:error] = l(:error_invalid_csv_file_or_settings)
57 56
    else
    (1-1/1)