diff --git a/src/fn_native.rs b/src/fn_native.rs index 4d2cf19b..820e5dc7 100644 --- a/src/fn_native.rs +++ b/src/fn_native.rs @@ -261,7 +261,9 @@ impl CallableFunction { pub fn is_pure(&self) -> bool { match self { Self::Pure(_) => true, - Self::Method(_) | Self::Iterator(_) | Self::Plugin(_) => false, + Self::Method(_) | Self::Iterator(_) => false, + + Self::Plugin(p) => !p.is_method_call(), #[cfg(not(feature = "no_function"))] Self::Script(_) => false, @@ -271,7 +273,9 @@ impl CallableFunction { pub fn is_method(&self) -> bool { match self { Self::Method(_) => true, - Self::Pure(_) | Self::Iterator(_) | Self::Plugin(_) => false, + Self::Pure(_) | Self::Iterator(_) => false, + + Self::Plugin(p) => p.is_method_call(), #[cfg(not(feature = "no_function"))] Self::Script(_) => false,