mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-04-27 14:57:46 +00:00
origin=: Do not raise error if the new value is the same as the stock value.
This commit is contained in:
parent
5a78013d85
commit
48f5783ba5
1 changed files with 1 additions and 0 deletions
|
|
@ -413,6 +413,7 @@ class HTTP::Cookie
|
||||||
|
|
||||||
# See #origin.
|
# See #origin.
|
||||||
def origin=(origin)
|
def origin=(origin)
|
||||||
|
return origin if origin == @origin
|
||||||
@origin.nil? or
|
@origin.nil? or
|
||||||
raise ArgumentError, "origin cannot be changed once it is set"
|
raise ArgumentError, "origin cannot be changed once it is set"
|
||||||
origin = URI(origin)
|
origin = URI(origin)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue