mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-25 07:23:43 +01:00
Fix already initialized constant warning (#26542)
This commit is contained in:
parent
6375e390af
commit
e7bea8f004
1 changed files with 3 additions and 5 deletions
|
@ -2,9 +2,7 @@
|
||||||
|
|
||||||
# Monkey patching until https://github.com/httprb/http/pull/757 is merged
|
# Monkey patching until https://github.com/httprb/http/pull/757 is merged
|
||||||
unless HTTP::Request::METHODS.include?(:purge)
|
unless HTTP::Request::METHODS.include?(:purge)
|
||||||
module HTTP
|
methods = HTTP::Request::METHODS.dup
|
||||||
class Request
|
HTTP::Request.send(:remove_const, :METHODS)
|
||||||
METHODS = METHODS.dup.push(:purge).freeze
|
HTTP::Request.const_set(:METHODS, methods.push(:purge).freeze)
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue