opal / opal-browser

Browser support for Opal.
MIT License
115 stars 36 forks source link

Fix Browser::Cookies: reading of cookies #64

Closed tongueroo closed 8 years ago

tongueroo commented 8 years ago

So it looks like the .scan regexp will result in an array of array structure:

>> matches = "a=1;b=2;c=3".scan(/b=([^;]*)/)
=> [["2"]]
>> matches.flatten
=> ["2"]
>> 

This fix flattens that structure and runs decode_uri_component on each value