Fixed compatibility issue for spec in Ruby 1.8