HF RL Explorer

Task: Safe Integer Parsing in Ruby

Task: Safe Integer Parsing in Ruby: a task in Terminal-Lego-15k (Harbor dataset). Create a Ruby script that safely parses strings into integers, raising an exception when the input string is not a valid integer representation, rather than silently returning 0 like Ruby's built-in String to i method.

The task

Create a Ruby script that safely parses strings into integers, raising an exception when the input string is not a valid integer representation, rather than silently returning `0` like Ruby's built-in `String#to_i` method.

Part of PrimeIntellect/Terminal-Lego-15k.