Ringgit gains as Brent crude and FBM KLCI rise