Move the ruby anonymous box logic back to its original place

This was moved in commit 3d05e2e05c72b01404cf290bf07c7f0f367827a7
but seems to belong better in its original place since it creates
boxes and does not merely set properties.