daniel-pittman/mcollective-plugins — comment on commit 43f9cce194ded6d38ab4df17877df0e20378dc6d
File: agent/puppetd/agent/puppetd.rb line 105
By ripienaar:

This file has just a single number in it at time, no multi lines etc.

File.read() will return a string in that case and so the 'first' will fail:

irb(main):001:0> File.read("/var/run/puppet/agent.pid")
=> "12684"