Skip to content

fix issue #4, gem changes behavior of integer division#5

Open
freefrancisco wants to merge 1 commit intoclbustos:masterfrom
freefrancisco:master
Open

fix issue #4, gem changes behavior of integer division#5
freefrancisco wants to merge 1 commit intoclbustos:masterfrom
freefrancisco:master

Conversation

@freefrancisco
Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got this Prime class from mathn.rb in ruby 1.8.7

clbustos pushed a commit that referenced this pull request Jan 23, 2016
Test on Ruby 2.2 and auto test on patched versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant