Changed ruby impl for exception