Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Reverting due to Ruby 1.8.7 incompatibility

Revert "Merge pull request #66 from kylewlacy/master"

This reverts commit 1ad87b6, reversing
changes made to 2141511.
  • Loading branch information...
commit 11070721abce0bdfff07284c440b28b4c81c85a7 1 parent 1ad87b6
@TrevorBramble TrevorBramble authored
Showing with 2 additions and 11 deletions.
  1. +2 −4 lib/sinatra/cookies.rb
  2. +0 −7 spec/cookies_spec.rb
View
6 lib/sinatra/cookies.rb
@@ -87,10 +87,8 @@ def [](key)
response_cookies[key.to_s] || request_cookies[key.to_s]
end
- def []=(key, options = {}, value)
- options = @options.merge(options).merge(:value => value)
-
- @response.set_cookie key.to_s, options
+ def []=(key, value)
+ @response.set_cookie key.to_s, @options.merge(:value => value)
end
def assoc(key)
View
7 spec/cookies_spec.rb
@@ -124,13 +124,6 @@ def cookies(*set_cookies)
cookie_jar['foo'].should be == 'bar'
end
- it 'sets a cookie with extra options' do
- cookie_route do
- cookies['foo', :path => '/baz'] = 'bar'
- response['Set-Cookie'].lines.detect { |l| l.start_with? 'foo=' }
- end.should include('path=/baz')
- end
-
it 'adds a value to the cookies hash' do
cookie_route do
cookies['foo'] = 'bar'
Please sign in to comment.
Something went wrong with that request. Please try again.