Skip to content

Commit

Permalink
Merge pull request #293 from jeremyevans/fstring
Browse files Browse the repository at this point in the history
Work with ruby 2.3's --enable-frozen-string-literal
  • Loading branch information
macournoyer committed Jan 11, 2016
2 parents b69057d + 6e6b1c2 commit 706642b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/thin/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Request
BODY_TMPFILE = 'thin-body'.freeze
MAX_HEADER = 1024 * (80 + 32)

INITIAL_BODY = ''
INITIAL_BODY = String.new
# Force external_encoding of request's body to ASCII_8BIT
INITIAL_BODY.encode!(Encoding::ASCII_8BIT) if INITIAL_BODY.respond_to?(:encode!) && defined?(Encoding::ASCII_8BIT)

Expand Down Expand Up @@ -52,7 +52,7 @@ class Request

def initialize
@parser = Thin::HttpParser.new
@data = ''
@data = String.new
@nparsed = 0
@body = StringIO.new(INITIAL_BODY.dup)
@env = {
Expand Down

0 comments on commit 706642b

Please sign in to comment.