File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
lib/device_detector/parser Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ def parse
1919
2020 regex , matches = regexes . detect do |regex |
2121 match = match_user_agent_r ( regex [ :regex ] )
22- match ? break [ regex , match ] : nil
22+ break [ regex , match ] if match
2323 end
2424
2525 next nil unless regex
Original file line number Diff line number Diff line change @@ -881,7 +881,7 @@ def parse_browser_from_user_agent
881881 regex , matches = regex_from_user_agent_cache do
882882 regexes . detect do |regex |
883883 match = match_user_agent_r ( regex [ :regex ] )
884- match ? break [ regex , match ] : nil
884+ break [ regex , match ] if match
885885 end
886886 end
887887
Original file line number Diff line number Diff line change @@ -530,7 +530,7 @@ def parse_os_from_user_agent
530530 os_regex , matches = regex_from_user_agent_cache do
531531 regexes . detect do |regex |
532532 match = match_user_agent_r ( regex [ :regex ] )
533- match ? break [ regex , match ] : nil
533+ break [ regex , match ] if match
534534 end
535535 end
536536
You can’t perform that action at this time.
0 commit comments