ruby closure conflict fix