From 4483bb5e13c261f16a5f81d87265fd1488724853 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 17 Jan 2023 16:16:55 +0100 Subject: [PATCH] coherence --- lib/rpl/types/complex.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rpl/types/complex.rb b/lib/rpl/types/complex.rb index 8b8d610..84ab5bd 100644 --- a/lib/rpl/types/complex.rb +++ b/lib/rpl/types/complex.rb @@ -21,7 +21,7 @@ module Types def self.can_parse?( value ) # we systematically trim enclosing () - value = value[1..-2] if value.is_a?( String ) && (value[0] == '(') && (value[-1] == ')') + value = value[1..-2] if value.is_a?( String ) && value[0] == '(' && value[-1] == ')' !Complex( value, exception: false ).nil? end