useragent icon indicating copy to clipboard operation
useragent copied to clipboard

Parsing does not work correctly for OS with a downcased string

Open martinmcfly opened this issue 7 years ago • 0 comments

example

eg_string = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5"
UserAgent.parse(eg_string).os
=> "OS X 10.6.8"
UserAgent.parse(eg_string.downcase).os
=> "intel mac os x 10_6_8"

martinmcfly avatar May 21 '18 15:05 martinmcfly