diff options
author | John Wiegley <johnw@newartisans.com> | 2009-01-19 22:29:09 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-01-19 22:29:09 -0400 |
commit | bcfd6d1db92260f3453f9733db727bf408a0732d (patch) | |
tree | 2401d756367a5d86192e5c5b9be231f302625ce1 /src/scope.h | |
parent | 7ffe0e1539a91bd9e307f7376bbbcd34a7a0f289 (diff) | |
download | fork-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.h | 6 |
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()); |