Skip to content

Commit 3f9709b

Browse files
committed
Fix several warnings.
1 parent 52e30a4 commit 3f9709b

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

lib/protocol/http/body/stream.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def write_nonblock(buffer)
155155
write(buffer)
156156
end
157157

158-
def << (buffer)
158+
def <<(buffer)
159159
write(buffer)
160160
end
161161

lib/protocol/http/middleware.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,25 @@ def self.close
5555
end
5656

5757
def self.call(request)
58-
Response[200, {}, []]
58+
Response[200]
5959
end
6060
end
6161

62-
module HelloWorld
62+
module NotFound
6363
def self.close
6464
end
6565

6666
def self.call(request)
67-
Response[200, Headers['content-type' => 'text/plain'], ["Hello World!"]]
67+
Response[404]
6868
end
6969
end
7070

71-
module NotFound
71+
module HelloWorld
7272
def self.close
7373
end
7474

7575
def self.call(request)
76-
Response[404, Headers[], []]
76+
Response[200, Headers['content-type' => 'text/plain'], ["Hello World!"]]
7777
end
7878
end
7979
end

lib/protocol/http/middleware/builder.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,6 @@
2525
module Protocol
2626
module HTTP
2727
class Middleware
28-
module NotFound
29-
def self.close
30-
end
31-
32-
def self.call(request)
33-
Response[404, Headers[], []]
34-
end
35-
end
36-
3728
class Builder
3829
def initialize(default_app = NotFound)
3930
@use = []

0 commit comments

Comments
 (0)