mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Drop Ruby 1.8 checks
This commit is contained in:
parent
1115703b7c
commit
0df3f3c115
1 changed files with 7 additions and 9 deletions
|
@ -24,16 +24,14 @@ describe Rack::Protection::PathTraversal do
|
|||
end
|
||||
end
|
||||
|
||||
if "".respond_to?(:encoding) # Ruby 1.9+ M17N
|
||||
context "PATH_INFO's encoding" do
|
||||
before do
|
||||
@app = Rack::Protection::PathTraversal.new(proc { |e| [200, {'Content-Type' => 'text/plain'}, [e['PATH_INFO'].encoding.to_s]] })
|
||||
end
|
||||
context "PATH_INFO's encoding" do
|
||||
before do
|
||||
@app = Rack::Protection::PathTraversal.new(proc { |e| [200, {'Content-Type' => 'text/plain'}, [e['PATH_INFO'].encoding.to_s]] })
|
||||
end
|
||||
|
||||
it 'should remain unchanged as ASCII-8BIT' do
|
||||
body = @app.call({ 'PATH_INFO' => '/'.encode('ASCII-8BIT') })[2][0]
|
||||
expect(body).to eq('ASCII-8BIT')
|
||||
end
|
||||
it 'should remain unchanged as ASCII-8BIT' do
|
||||
body = @app.call({ 'PATH_INFO' => '/'.encode('ASCII-8BIT') })[2][0]
|
||||
expect(body).to eq('ASCII-8BIT')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue