From dc3b5e10f0c43c93d0b8dfe6a47c458d931ab076 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 2 Mar 2015 20:25:06 +0000 Subject: http: remove deprecated reset method We use the `clear' method everywhere nowadays. --- ext/unicorn_http/unicorn_http.rl | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/ext/unicorn_http/unicorn_http.rl b/ext/unicorn_http/unicorn_http.rl index 932d259..03b4726 100644 --- a/ext/unicorn_http/unicorn_http.rl +++ b/ext/unicorn_http/unicorn_http.rl @@ -618,27 +618,6 @@ static VALUE HttpParser_dechunk_bang(VALUE self) return self; } -/** - * call-seq: - * parser.reset => nil - * - * Resets the parser to it's initial state so that you can reuse it - * rather than making new ones. - * - * This method is deprecated and to be removed in Unicorn 4.x - */ -static VALUE HttpParser_reset(VALUE self) -{ - static int warned; - - if (!warned) { - rb_warn("Unicorn::HttpParser#reset is deprecated; " - "use Unicorn::HttpParser#clear instead"); - } - HttpParser_clear(self); - return Qnil; -} - static void advance_str(VALUE str, off_t nr) { long len = RSTRING_LEN(str); @@ -939,7 +918,6 @@ void Init_unicorn_http(void) rb_define_alloc_func(cHttpParser, HttpParser_alloc); rb_define_method(cHttpParser, "initialize", HttpParser_init, 0); rb_define_method(cHttpParser, "clear", HttpParser_clear, 0); - rb_define_method(cHttpParser, "reset", HttpParser_reset, 0); rb_define_method(cHttpParser, "dechunk!", HttpParser_dechunk_bang, 0); rb_define_method(cHttpParser, "parse", HttpParser_parse, 0); rb_define_method(cHttpParser, "add_parse", HttpParser_add_parse, 1); -- cgit v1.2.3-24-ge0c7