updated ruby block idempotence