Repair bug: environments should have symbol keys, not string keys

This commit is contained in:
Tony Garnock-Jones 2021-11-14 15:47:12 +01:00
parent 4deb9cbfcc
commit ce743fa934
1 changed files with 1 additions and 1 deletions

View File

@ -281,7 +281,7 @@ impl Env {
fn lookup(&self, s: &str, what: &'static str) -> io::Result<AnyValue> {
if s == "." {
Ok(AnyValue::new(self.bindings.iter().map(|(k, v)| (AnyValue::new(k), v.clone()))
Ok(AnyValue::new(self.bindings.iter().map(|(k, v)| (AnyValue::symbol(k), v.clone()))
.collect::<Map<AnyValue, AnyValue>>()))
} else {
Ok(self.bindings.get(s).ok_or_else(