diff --git a/src/crypto/bcrypt/password.cr b/src/crypto/bcrypt/password.cr index 799f3fdf9bd5..19b199681f94 100644 --- a/src/crypto/bcrypt/password.cr +++ b/src/crypto/bcrypt/password.cr @@ -69,11 +69,6 @@ class Crypto::Bcrypt::Password Crypto::Subtle.constant_time_compare(@raw_hash, hashed_password) end - @[Deprecated("Use `Crypto::Bcrypt::Password#verify`")] - def ==(password : String) : Bool - verify(password) - end - def to_s(io : IO) : Nil io << @raw_hash end diff --git a/src/http/server/response.cr b/src/http/server/response.cr index 6f51e2f3e504..a76da41b100f 100644 --- a/src/http/server/response.cr +++ b/src/http/server/response.cr @@ -123,14 +123,6 @@ class HTTP::Server @output.closed? end - # Sends an error response. - # - # Calls `#reset`, writes the given status, and closes the response. - @[Deprecated("Use #respond_with_status instead")] - def respond_with_error(message = "Internal Server Error", code = 500) - respond_with_status(code, message) - end - @status_message : String? # Sends *status* and *message* as response. diff --git a/src/json/pull_parser.cr b/src/json/pull_parser.cr index 700c5d26ca3b..0eea164e07e9 100644 --- a/src/json/pull_parser.cr +++ b/src/json/pull_parser.cr @@ -11,24 +11,6 @@ class JSON::PullParser BeginObject EndObject EOF - - @[Deprecated("JSON::PullParser#kind now is an enum, please use that instead of symbols")] - def ==(other : Symbol) - case other - when :null then null? - when :bool then bool? - when :int then int? - when :float then float? - when :string then string? - when :begin_array then begin_array? - when :end_array then end_array? - when :begin_object then begin_object? - when :end_object then end_object? - when :EOF then eof? - else - false - end - end end private enum ObjectStackKind @@ -563,10 +545,3 @@ class JSON::PullParser @object_stack.push(kind) end end - -struct Symbol - @[Deprecated("JSON::PullParser#kind now is an enum, please use that instead of symbols")] - def ==(other : JSON::PullParser::Kind) - other == self - end -end diff --git a/src/json/token.cr b/src/json/token.cr index 8a4ba0c43321..68fed888dbae 100644 --- a/src/json/token.cr +++ b/src/json/token.cr @@ -33,40 +33,6 @@ class JSON::Token @raw_value = "" end - @[Deprecated("Use JSON::Token#kind, which is an enum")] - def type : Symbol - case @kind - when .null? - :null - when .false? - :false - when .true? - :true - when .int? - :INT - when .float? - :FLOAT - when .string? - :STRING - when .begin_array? - :"[" - when .end_array? - :"]" - when .begin_object? - :"{" - when .end_object? - :"}" - when .colon? - :":" - when .comma? - :"," - when .eof? - :EOF - else - raise "Unknown token kind: #{@kind}" - end - end - def to_s(io : IO) : Nil case @kind when .null? diff --git a/src/string.cr b/src/string.cr index 29356c188988..8645bffc7c91 100644 --- a/src/string.cr +++ b/src/string.cr @@ -844,16 +844,6 @@ class String self[regex, group]?.not_nil! end - @[Deprecated("Use `String#char_at` instead.")] - def at(index : Int) - char_at(index) - end - - @[Deprecated("Use `String#char_at` instead.")] - def at(index : Int) - char_at(index) { yield } - end - def char_at(index : Int) char_at(index) { raise IndexError.new } end diff --git a/src/time.cr b/src/time.cr index e2201fe5f34d..0f955381f659 100644 --- a/src/time.cr +++ b/src/time.cr @@ -431,16 +431,6 @@ struct Time new(seconds: seconds, nanoseconds: nanosecond.to_i, location: location) end - @[Deprecated("Use `Time.local` instead.")] - def self.new(location : Location = Location.local) : Time - local(location) - end - - @[Deprecated("Use `Time.local` instead.")] - def self.new(year : Int32, month : Int32, day : Int32, hour : Int32 = 0, minute : Int32 = 0, second : Int32 = 0, *, nanosecond : Int32 = 0, location : Location = Location.local) : Time - local(year, month, day, hour, minute, second, nanosecond: nanosecond, location: location) - end - # Creates a new `Time` instance representing the given date-time in UTC. # # ``` @@ -541,20 +531,6 @@ struct Time utc(seconds: seconds, nanoseconds: nanoseconds.to_i) end - # Creates a new `Time` instance representing the current time from the - # system clock observed in *location* (defaults to local time zone). - @[Deprecated("Use `Time.local` or `Time.utc` instead.")] - def self.now(location : Location = Location.local) : Time - local(location) - end - - # Creates a new `Time` instance representing the current time from the - # system clock in UTC. - @[Deprecated("Use `Time.utc` instead.")] - def self.utc_now : Time - utc - end - # Creates a new `Time` instance with the same local date-time representation # (wall clock) in a different *location*. # diff --git a/src/uri/encoding.cr b/src/uri/encoding.cr index 7f5e2645156c..cd92b896dc99 100644 --- a/src/uri/encoding.cr +++ b/src/uri/encoding.cr @@ -107,16 +107,6 @@ class URI decode(string, io, plus_to_space: plus_to_space) end - @[Deprecated("Use .decode or .decode_www_form instead")] - def self.unescape(string : String, io : IO, plus_to_space = false) - decode_www_form(string, io, plus_to_space: plus_to_space) - end - - @[Deprecated("Use .decode or .decode_www_form instead")] - def self.unescape(string : String, plus_to_space = false) - decode_www_form(string, plus_to_space: plus_to_space) - end - # URL-encodes *string* as [`x-www-form-urlencoded`](https://url.spec.whatwg.org/#urlencoded-serializing). # # Reserved characters are escaped, unreserved characters are not. @@ -165,16 +155,6 @@ class URI end end - @[Deprecated("Use .encode or .encode_www_form instead")] - def self.escape(string : String, io : IO, space_to_plus = false) - encode_www_form(string, io, space_to_plus: space_to_plus) - end - - @[Deprecated("Use .encode or .encode_www_form instead")] - def self.escape(string : String, space_to_plus = false) - encode_www_form(string, space_to_plus: space_to_plus) - end - # Returns whether given byte is reserved character defined in # [RFC 3986](https://tools.ietf.org/html/rfc3986). #