Was Boaz divorced before he married Ruth? I understand that God allowed them to marry. Isn't that adultery?
There is no indication in the book of Ruth that Boaz had ever been married before he married Ruth. The only one of the two that had been previously married, as far as we know, was Ruth herself. Her marriage ended with the death of her husband. Legally, therefore, there was no adultery. "Know ye not, brethren, (for I speak to them that know the law,) how that the law hath dominion over a man as long as he liveth? For the woman which hath an husband is bound by the law to her husband so long as he liveth; but if the husband be dead, she is loosed from the law of her husband. So then if, while her husband liveth, she be married to another man, she shall be called an adulteress: but if her husband be dead, she is free from that law; so that she is no adulteress, though she be married to another man." (Romans 7:1-3)
Much of chapter 4 of Ruth concerns a legal matter concerning which near kinsman, Boaz or another, will marry Ruth in order to give her a child in the name of her former husband. Her firstborn would legally be considered as having the inheritance from her first husband. But that relates to the child born to them, and not to whether they were legally married.