gem only changes behavior of integer division in ruby versions < 1.9, because it includes mathn in order to use Prime. But mathn has the side effect of changing integer division. Instead of including mathn, we can just copy the Prime code from ruby 1.8.7 in the one line where mathn is called.
gem only changes behavior of integer division in ruby versions < 1.9, because it includes mathn in order to use Prime. But mathn has the side effect of changing integer division. Instead of including mathn, we can just copy the Prime code from ruby 1.8.7 in the one line where mathn is called.