def div
begin
x = 20 / 0 # 10
rescue
pp "Division durch NULL ! "
end
end
x = div
pp x.to_s
Hi,
I have this little Program. I don’t understand why the rescue don’t work.
Compiling is ok.
Output for 20 / 10 is ok
Output for 20 / 0 is Infinity but not the pp “…”
Why?
(Sorry for my English)