Skip to content

Commit 7863730

Browse files
committed
Change .dump to .inspect. Fixes #34.
1 parent 9cfcbd7 commit 7863730

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/protocol/http1/body/chunked.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def read
4545
length, _extensions = read_line.split(";", 2)
4646

4747
unless length =~ VALID_CHUNK_LENGTH
48-
raise BadRequest, "Invalid chunk length: #{length.dump}"
48+
raise BadRequest, "Invalid chunk length: #{length.inspect}"
4949
end
5050

5151
# It is possible this line contains chunk extension, so we use `to_i` to only consider the initial integral part:
@@ -93,7 +93,7 @@ def read_trailer
9393
if match = line.match(HEADER)
9494
@headers.add(match[1], match[2])
9595
else
96-
raise BadHeader, "Could not parse header: #{line.dump}"
96+
raise BadHeader, "Could not parse header: #{line.inspect}"
9797
end
9898
end
9999
end

lib/protocol/http1/connection.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def read_headers
240240
if match = line.match(HEADER)
241241
fields << [match[1], match[2]]
242242
else
243-
raise BadHeader, "Could not parse header: #{line.dump}"
243+
raise BadHeader, "Could not parse header: #{line.inspect}"
244244
end
245245
end
246246

@@ -445,7 +445,7 @@ def extract_content_length(headers)
445445
if content_length =~ VALID_CONTENT_LENGTH
446446
yield Integer(content_length, 10)
447447
else
448-
raise BadRequest, "Invalid content length: #{content_length.dump}"
448+
raise BadRequest, "Invalid content length: #{content_length.inspect}"
449449
end
450450
end
451451
end

0 commit comments

Comments
 (0)