mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
backporting infinite method
This commit is contained in:
parent
7ee4c5f6d3
commit
d92de449ef
@ -34,6 +34,7 @@ module HTTPX
|
||||
include Callbacks
|
||||
|
||||
using URIExtensions
|
||||
using NumericExtensions
|
||||
|
||||
require "httpx/connection/http2"
|
||||
require "httpx/connection/http1"
|
||||
|
@ -54,6 +54,14 @@ module HTTPX
|
||||
Numeric.__send__(:include, NegMethods)
|
||||
end
|
||||
|
||||
module NumericExtensions
|
||||
refine Numeric do
|
||||
def infinite?
|
||||
self == Float::INFINITY
|
||||
end unless Numeric.method_defined?(:infinite?)
|
||||
end
|
||||
end
|
||||
|
||||
module StringExtensions
|
||||
refine String do
|
||||
def delete_suffix!(suffix)
|
||||
|
Loading…
x
Reference in New Issue
Block a user