diff --git a/parser/src/lexer.rs b/parser/src/lexer.rs index 10fb77853..eda96ea74 100644 --- a/parser/src/lexer.rs +++ b/parser/src/lexer.rs @@ -1625,7 +1625,7 @@ mod tests { is_fstring: false, }, Tok::String { - value: String::from("raw\'"), + value: String::from("raw\\'"), is_fstring: false, }, Tok::String { diff --git a/src/shell.rs b/src/shell.rs index dafe3aaec..4a6c095e6 100644 --- a/src/shell.rs +++ b/src/shell.rs @@ -19,7 +19,7 @@ enum ShellExecResult { fn shell_exec(vm: &VirtualMachine, source: &str, scope: Scope) -> ShellExecResult { match vm.compile(source, compile::Mode::Single, "".to_owned()) { - Ok(code) => match vm.run_code_obj(code, scope.clone()) { + Ok(code) => match vm.run_code_obj(code, scope) { Ok(_val) => ShellExecResult::Ok, Err(err) => ShellExecResult::PyErr(err), },