lib/rack/conditional_get.rb in rack-2.0.9.4 vs lib/rack/conditional_get.rb in rack-2.1.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'rack/utils' module Rack # Middleware that enables conditional GET using If-None-Match and @@ -66,10 +68,10 @@ def to_rfc2822(since) # shortest possible valid date is the obsolete: 1 Nov 97 09:55 A # anything shorter is invalid, this avoids exceptions for common cases # most common being the empty string if since && since.length >= 16 - # NOTE: there is no trivial way to write this in a non execption way + # NOTE: there is no trivial way to write this in a non exception way # _rfc2822 returns a hash but is not that usable Time.rfc2822(since) rescue nil else nil end