Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Using .scan instead of .match for regexp to detect multiple devices

  • Loading branch information...
commit da6310147085d1a01e318ab4776a47dc05725e31 1 parent aefb62d
Felix Rotthowe authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/findmyiphone.rb
View
2  lib/findmyiphone.rb
@@ -25,7 +25,7 @@ def devices
}
page = @agent.post(devicesurl)
- @thedevices = page.content.match(/tDeviceMgmt.deviceIdMap\['[0-9+]'\] = '([^']+)'/).captures
+ @thedevices = page.content.scan(/tDeviceMgmt.deviceIdMap\['[0-9+]'\] = '([^']+)'/).flatten
end
return @thedevices
end
Please sign in to comment.
Something went wrong with that request. Please try again.