openwebwork/pg — pull request #174 by dpvc (2014-10-05 15:15:16+00:00)
Title: Fix problem where Currency($r) changes the class of $r.

This patch fixes the problem reported in issue #171, where passing a MathObject real to `Currency()` would change the class of the real itself. This is a test case:

```
DOCUMENT();

loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"contextCurrency.pl",
);

Context("Currency");
$r = Real(1);
$c = Currency($r);

TEXT($r," ",$r->class)

ENDDOCUMENT();
```

Without the patch, it should produce `$1.00 Currency`, and with the patch it should produce `1 Real`.