Make specs green in ruby 1.8 and 1.9.

Change-Id: I012f31fd8470cd61abacb1f81a8aa15c0e86d14d