Skip to content
Browse files

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

  • Loading branch information...
1 parent aefb62d commit da6310147085d1a01e318ab4776a47dc05725e31 Felix Rotthowe committed Aug 6, 2009
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

0 comments on commit da63101

Please sign in to comment.
Something went wrong with that request. Please try again.