Improve Ruby syntax