Skip to content

Commit

Permalink
Using .scan instead of .match for regexp to detect multiple devices
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Rotthowe committed Aug 6, 2009
1 parent aefb62d commit da63101
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/findmyiphone.rb
Expand Up @@ -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
Expand Down

0 comments on commit da63101

Please sign in to comment.