mirror of
https://github.com/nushell/nushell.git
synced 2025-08-18 16:58:51 +02:00
Remove the Value::Block
case (#12582)
# Description `Value` describes the types of first-class values that users and scripts can create, manipulate, pass around, and store. However, `Block`s are not first-class values in the language, so this PR removes it from `Value`. This removes some unnecessary code, and this change should be invisible to the user except for the change to `scope modules` described below. # User-Facing Changes Breaking change: the output of `scope modules` was changed so that `env_block` is now `has_env_block` which is a boolean value instead of a `Block`. # After Submitting Update the language guide possibly.
This commit is contained in:
@@ -134,10 +134,10 @@ fn correct_scope_modules_fields() {
|
||||
|
||||
let inp = &[
|
||||
"use spam.nu",
|
||||
"scope modules | where name == spam | get 0.env_block | is-empty",
|
||||
"scope modules | where name == spam | get 0.has_env_block",
|
||||
];
|
||||
let actual = nu!(cwd: dirs.test(), &inp.join("; "));
|
||||
assert_eq!(actual.out, "false");
|
||||
assert_eq!(actual.out, "true");
|
||||
|
||||
let inp = &[
|
||||
"use spam.nu",
|
||||
|
Reference in New Issue
Block a user