diff --git a/README.md b/README.md index 7255ce3f..3b302577 100644 --- a/README.md +++ b/README.md @@ -1471,8 +1471,8 @@ The following methods (defined in the [`BasicMapPackage`](#packages) but exclude | `remove` | property name | removes a certain property and returns it ([`()`] if the property does not exist) | | `mixin` | second object map | mixes in all the properties of the second object map to the first (values of properties with the same names replace the existing values) | | `+` operator | first object map, second object map | merges the first object map with the second | -| `keys` | _none_ | returns an [array] of all the property names (in random order) | -| `values` | _none_ | returns an [array] of all the property values (in random order) | +| `keys` | _none_ | returns an [array] of all the property names (in random order), not available under [`no_index`] | +| `values` | _none_ | returns an [array] of all the property values (in random order), not available under [`no_index`] | ### Examples diff --git a/tests/arrays.rs b/tests/arrays.rs index 60a41be4..ea710eba 100644 --- a/tests/arrays.rs +++ b/tests/arrays.rs @@ -13,6 +13,7 @@ fn test_arrays() -> Result<(), Box> { ); assert!(engine.eval::("let y = [1, 2, 3]; 2 in y")?); + #[cfg(not(feature = "no_object"))] assert_eq!( engine.eval::( r" @@ -35,7 +36,7 @@ fn test_arrays() -> Result<(), Box> { r" let x = [1, 2, 3]; x += [4, 5]; - x.len() + len(x) " )?, 5 diff --git a/tests/for.rs b/tests/for.rs index 081fddb9..2512ec72 100644 --- a/tests/for.rs +++ b/tests/for.rs @@ -31,6 +31,7 @@ fn test_for_array() -> Result<(), Box> { } #[cfg(not(feature = "no_object"))] +#[cfg(not(feature = "no_index"))] #[test] fn test_for_object() -> Result<(), Box> { let engine = Engine::new();