Skip to content

Commit

Permalink
size is not part of the input SPEC
Browse files Browse the repository at this point in the history
If size is added as a formal requirement, revert this commit. Till
then Lint should bomb if middleware tries to access
env['rack.input'].size.

Discussion about adding #size to rack.input
http://groups.google.com/group/rack-devel/browse_thread/thread/9c06163a4b13ccad
  • Loading branch information
josh committed Apr 7, 2010
1 parent 98a61aa commit 11c9609
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
4 changes: 0 additions & 4 deletions lib/rack/lint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,6 @@ def initialize(input)
@input = input
end

def size
@input.size
end

## * +gets+ must be called without arguments and return a string,
## or +nil+ on EOF.
def gets(*args)
Expand Down
11 changes: 0 additions & 11 deletions test/spec_rack_lint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -506,17 +506,6 @@ def rewind
end

context "Rack::Lint::InputWrapper" do
specify "delegates :size to underlying IO object" do
class IOMock
def size
101
end
end

wrapper = Rack::Lint::InputWrapper.new(IOMock.new)
wrapper.size.should == 101
end

specify "delegates :rewind to underlying IO object" do
io = StringIO.new("123")
wrapper = Rack::Lint::InputWrapper.new(io)
Expand Down

0 comments on commit 11c9609

Please sign in to comment.