From afa93b0d3107e7328d1961699e7fd4d618e12e6c Mon Sep 17 00:00:00 2001 From: David Kellum Date: Wed, 28 Sep 2011 22:36:04 -0700 Subject: [PATCH] Add parens for 'Ambiguous first argument' warnings in jruby --- lib/sinatra/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sinatra/base.rb b/lib/sinatra/base.rb index bb67cc60..2be5c30d 100644 --- a/lib/sinatra/base.rb +++ b/lib/sinatra/base.rb @@ -845,7 +845,7 @@ module Sinatra return unless path.start_with?(public_dir) and File.file?(path) env['sinatra.static_file'] = path - cache_control *settings.static_cache_control if settings.static_cache_control? + cache_control(*settings.static_cache_control) if settings.static_cache_control? send_file path, :disposition => nil end @@ -1213,7 +1213,7 @@ module Sinatra keys = [] if path.respond_to? :to_str pattern = path.to_str.gsub(/[^\?\%\\\/\:\*\w]/) { |c| encoded(c) } - pattern.gsub! /((:\w+)|\*)/ do |match| + pattern.gsub!(/((:\w+)|\*)/) do |match| if match == "*" keys << 'splat' "(.*?)"