ruby merge problem