Failed device_brand method
Closed this issue · 1 comments
rus-max commented
DeviceDetector.new(Faker::Internet.user_agent).device_brand
device_detector/lib/device_detector/parser.rb:101:in `block in parse_regexes': no implicit conversion of Symbol into Integer (TypeError)
File structure is different
girardof commented
Hi rus-max and thank you for opening this issue. I tried to reproduced it using device_detector-1.1.1
and the following snippet:
100.times do
ua = Faker::Internet.user_agent
puts ua
puts DeviceDetector.new(ua).device_brand
end
But for me it worked as expected, example here:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A
Apple
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko
Did you tested this issue using the latest version of device_detector?