lib/remnant/rack.rb in remnant-0.9.3 vs lib/remnant/rack.rb in remnant-0.9.4

- old
+ new

@@ -11,11 +11,11 @@ @response = @app.call(env) else begin # only gc capture as dev - if env['rack.request.cookie_hash']['developer'] == '1' + if env['rack.request.cookie_hash'].is_a?(Hash) && env['rack.request.cookie_hash']['developer'] == '1' ::Remnant::GC.enable_stats end # record request time ::Remnant::Discover.measure('request') do @@ -24,10 +24,10 @@ # collect & clear stats for next request ::Remnant.collect # only gc capture as dev - if env['rack.request.cookie_hash']['developer'] == '1' + if env['rack.request.cookie_hash'].is_a?(Hash) && env['rack.request.cookie_hash']['developer'] == '1' ::Remnant::GC.clear_stats end ::Rails.logger.flush if ::Rails.logger.respond_to?(:flush) rescue ::Exception => exception