diff --git a/lib/apex/frame/immutable_entity.rb b/lib/apex/frame/immutable_entity.rb index bd9216463c3c69fb62ca4669632da3a20510841d..7fe078154c50318b4022dc0c90fc41549b27c636 100644 --- a/lib/apex/frame/immutable_entity.rb +++ b/lib/apex/frame/immutable_entity.rb @@ -15,7 +15,7 @@ module Apex raise ArgumentError.new("ssid must be an Integer.") if (not ssid.nil?) && (not ssid.kind_of? Integer) raise ArgumentError.new("ssid must be a value between 0 (inclusive) and 15 (inclusive): #{callsign}-#{ssid}") if (not ssid.nil?) && (ssid < 0 || ssid > 15) && (strict_ssid) - raise ArgumentError.new("Callsign can not be an empty string") if callsign.empty? + raise ArgumentError.new("Callsign can not be an empty string") if callsign.empty? && strict_callsign raise ArgumentError.new("Callsign must only contain numebers and letters") if callsign.strip.match?(/[^a-zA-Z0-9]/) && (strict_callsign) @callsign = callsign.strip.upcase.freeze @@ -35,7 +35,7 @@ module Apex hop = raw_hop.dup - raise ArgumentError.new("Hops can only contain letters, numbers and dashes") if hop.strip.match?(/[^a-zA-Z0-9\-]/) + raise ArgumentError.new("Hops can only contain letters, numbers and dashes") if hop.strip.match?(/[^a-zA-Z0-9\-]/) && strict_callsign if not hop.include? "-" ssid = nil