origin=: Do not raise error if the new value is the same as the stock value.

This commit is contained in:
Akinori MUSHA 2013-03-29 02:14:55 +09:00
parent 5a78013d85
commit 48f5783ba5

View file

@ -413,6 +413,7 @@ class HTTP::Cookie
# See #origin.
def origin=(origin)
return origin if origin == @origin
@origin.nil? or
raise ArgumentError, "origin cannot be changed once it is set"
origin = URI(origin)