From b9d37b2f3f9eea5f1d6043f1c1d23abebf0f095a Mon Sep 17 00:00:00 2001 From: Serg F Date: Fri, 13 Jul 2012 18:16:03 +0400 Subject: [PATCH] fix return nil when restriction valid --- lib/wsdl/xmlSchema/simpleType.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/wsdl/xmlSchema/simpleType.rb b/lib/wsdl/xmlSchema/simpleType.rb index a10420dd..6edd775a 100644 --- a/lib/wsdl/xmlSchema/simpleType.rb +++ b/lib/wsdl/xmlSchema/simpleType.rb @@ -76,9 +76,7 @@ def parse_attr(attr, value) private def check_restriction(value) - unless @restriction.valid?(value) - raise XSD::ValueSpaceError.new("#{@name}: cannot accept '#{value}'") - end + @restriction.valid?(value) || raise( XSD::ValueSpaceError.new("#{@name}: cannot accept '#{value}'") ) end end