@ccope 
OMG, you are correct.
`rd` is always NilClass.

I fixed it and update PR.