summaryrefslogtreecommitdiff
path: root/src/scope.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-01-19 22:29:09 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-01-19 22:29:09 -0400
commitbcfd6d1db92260f3453f9733db727bf408a0732d (patch)
tree2401d756367a5d86192e5c5b9be231f302625ce1 /src/scope.h
parent7ffe0e1539a91bd9e307f7376bbbcd34a7a0f289 (diff)
downloadfork-ledger-bcfd6d1db92260f3453f9733db727bf408a0732d.tar.gz
fork-ledger-bcfd6d1db92260f3453f9733db727bf408a0732d.tar.bz2
fork-ledger-bcfd6d1db92260f3453f9733db727bf408a0732d.zip
When setting a scope's argument, convert the list to a sequence if it's not
already.
Diffstat (limited to 'src/scope.h')
-rw-r--r--src/scope.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/scope.h b/src/scope.h
index cd6fc15a..e4f3f76c 100644
--- a/src/scope.h
+++ b/src/scope.h
@@ -141,8 +141,10 @@ public:
}
void set_args(const value_t& _args) {
- assert(_args.is_sequence());
- args = _args;
+ if (_args.is_sequence())
+ args = _args;
+ else
+ args = _args.to_sequence();
}
value_t& value() {
assert(args.is_null() || args.is_sequence());