This now works as we expect, but requires ruby 1.9