From: dpvc v. a. <we...@ma...> - 2010-02-08 14:52:24
|
Log Message: ----------- Make sure makeValue set's the context, if requested Modified Files: -------------- pg/lib: Value.pm Revision Data ------------- Index: Value.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value.pm,v retrieving revision 1.97 retrieving revision 1.98 diff -Llib/Value.pm -Llib/Value.pm -u -r1.97 -r1.98 --- lib/Value.pm +++ lib/Value.pm @@ -372,9 +372,13 @@ =cut sub makeValue { - my $x = shift; return $x if Value::isValue($x); + my $x = shift; my %params = (showError => 0, makeFormula => 1, context => Value->context, @_); my $context = $params{context}; + if (Value::isValue($x)) { + return $x unless {@_}->{context}; + return $x->copy->inContext($context); + } return $context->Package("Real")->make($context,$x) if matchNumber($x); if (matchInfinite($x)) { my $I = $context->Package("Infinity")->new($context); |