When I run the following, rescue seems to be ignored for ArgumentError. The ArgumentError error message from Ruby appears on the console, but my puts message does not. I tried rescue with TypeError and ZeroDivisionError, and it worked.
def divide(a, b)
begin
a.to_s + ' divided by ' + b.to_s + ' is ' + (a/b).to_s
rescue ArgumentError
puts 'there must be two arguments'
end
end
divide(4)