Log Message:
-----------
Disassemble Formula's properly when used with multiple variables in
substitute(), etc. For example:
$f->substitute(['x','y'] => Formula("xy,x^2-y^2"));
Modified Files:
--------------
pg/lib:
Parser.pm
Revision Data
-------------
Index: Parser.pm
===================================================================
RCS file: /webwork/cvs/system/pg/lib/Parser.pm,v
retrieving revision 1.47
retrieving revision 1.48
diff -Llib/Parser.pm -Llib/Parser.pm -u -r1.47 -r1.48
--- lib/Parser.pm
+++ lib/Parser.pm
@@ -736,7 +736,9 @@
while (scalar(@_)) {
$xref = shift; $value = shift;
if (ref($xref) eq "ARRAY") {
- $value = [@{$value->{data}}] if Value::isValue($value);
+ $value = Value::makeValue($value,context=>$context) unless ref($value);
+ $value = [$value->value] if Value::isValue($value);
+ $value = @{$value}[0,1] if Value::classMatch("Interval");
$value = [$value] unless ref($value) eq 'ARRAY';
} else {
$xref = [$xref]; $value = [$value];
|