Currently 
[`Cookies#to_a`](https://github.com/watir/watir-webdriver/blob/master/lib/watir-webdriver/cookies.rb#L21-L23)
 changes original object, by using `#each` to change the `:expires` parameter.

I think that this is a bad idea and `#to_a` should not have any side-effects 
whatsoever. `#map` should be used instead like this:

```ruby
def to_a
  @control.all_cookies.map do |e|
    e.merge(:expires => e[:expires] ? to_time(e[:expires]) : nil)
  end
end
```

Also, is there any reason why `Cookies#add` isn't formatting the expires?

---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-webdriver/issues/250
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to