Skip to content

Commit

Permalink
Set up remaining converters as postfix rescue for now.
Browse files Browse the repository at this point in the history
@enebo improved our runtime to omit stack traces downstream from
simple postfix rescues, but simple long-form rescues don't get
that optimization yet. This is a temporary measure until they do.
headius committed Sep 29, 2015
1 parent 6bd67c2 commit 16dcafe
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/ruby/stdlib/csv.rb
Original file line number Diff line number Diff line change
@@ -955,17 +955,13 @@ def self.date(f)
begin
e = f.encode(ConverterEncoding)
e =~ DateMatcher ? Date.parse(e) : f
rescue # encoding conversion or date parse errors
f
end
end rescue r # encoding conversion or date parse errors
end
def self.date_time(f)
begin
e = f.encode(ConverterEncoding)
e =~ DateTimeMatcher ? DateTime.parse(e) : f
rescue # encoding conversion or date parse errors
f
end
end rescue r # encoding conversion or date parse errors
end
end
Converters = { integer: converter_methods.method(:integer),

0 comments on commit 16dcafe

Please sign in to comment.