Remove unwanted newlines at beginning of buffers before resolving
Update ruby code sample