Update device.rb

The captures call returns an array, we need the first result only