From: Eric Wong <kcar-public@bogomips.org>
To: kcar-public@bogomips.org
Subject: [PATCH 6/6] response: remove Ruby 1.8-compatibility check
Date: Sun, 5 Mar 2017 23:13:16 +0000 [thread overview]
Message-ID: <20170305231316.8645-7-kcar-public@bogomips.org> (raw)
In-Reply-To: <20170305231316.8645-1-kcar-public@bogomips.org>
String#clear is available since Ruby 1.9.1+
---
lib/kcar/response.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/kcar/response.rb b/lib/kcar/response.rb
index 7fa804b..58a7148 100644
--- a/lib/kcar/response.rb
+++ b/lib/kcar/response.rb
@@ -141,7 +141,7 @@ class Kcar::Response
len -= @sock.readpartial(len > READ_SIZE ? READ_SIZE : len, dst).size
yield dst
end while len > 0
- dst.respond_to?(:clear) ? dst.clear : @buf = ""
+ dst.clear
end
end
@parser.body_bytes_left = 0
--
EW
prev parent reply other threads:[~2017-03-05 23:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-05 23:13 [PATCH 0/6] more minor doc updates Eric Wong
2017-03-05 23:13 ` [PATCH 1/6] update documentation for contributions, remove private address Eric Wong
2017-03-11 21:31 ` [PATCH] HACKING: remove copy+pasted line about N Eric Wong
2017-03-05 23:13 ` [PATCH 2/6] doc: minor updates to describe classes, better Eric Wong
2017-03-05 23:13 ` [PATCH 3/6] response: remove unnecessary constant alias Eric Wong
2017-03-05 23:13 ` [PATCH 4/6] response: more documentation cleanups Eric Wong
2017-03-05 23:13 ` [PATCH 5/6] favor require_relative to speed up loading Eric Wong
2017-03-05 23:13 ` Eric Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/kcar/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170305231316.8645-7-kcar-public@bogomips.org \
--to=kcar-public@bogomips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/kcar.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).