I am having an application on Ruby On Rails.
In application I want to override parent class of division in Ruby.
For handling below exceptions.
I Googled everywhere. I want to override ruby division method in application.
So that for below results it should return zero.
0.0 / 0
=> NaN
1.0 / 0
=> Infinity
ZeroDivisionError: divided by 0
I can handle it by changing code everywhere while divide operation. But I want to save my time by overriding the method itself.