Skip to content

Conversation

@drgrice1
Copy link
Member

@drgrice1 drgrice1 commented Nov 6, 2025

This is a possible fix for #1340. Instead of calling the eval method in the context::Fraction::Value::Real method for a Value Fraction object, just use the perl quotient of the numerator and denominator. That is then mutated into a real in the return value.

Edit: This is now @dpvc's suggested code from his comment in #1340.

@drgrice1 drgrice1 requested a review from dpvc November 6, 2025 23:30
@somiaj
Copy link
Contributor

somiaj commented Nov 6, 2025

@drgrice1 did you see the fix @dpvc suggested in the issue?

@drgrice1
Copy link
Member Author

drgrice1 commented Nov 6, 2025

I did not see @dpvc's comment on #1340 before I made this pull request. It looks like he offered a suggestion there. So that may preempt this pull request.

This is a possible fix for openwebwork#1340.  This is now @dpvc's suggested code
from his comment in openwebwork#1340.
@drgrice1 drgrice1 force-pushed the bugfix/context-fraction-eval-issue branch from 59f7d6a to 3c05a41 Compare November 6, 2025 23:40
Copy link
Contributor

@somiaj somiaj left a comment

Choose a reason for hiding this comment

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

Confirmed this fixed both MWE in the issue.

@somiaj
Copy link
Contributor

somiaj commented Nov 7, 2025

Worth adding this to the list of hotfixes to contextFraction?

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.

3 participants