@@ -37,7 +37,7 @@ def initialize(raw_text, options={})
3737
3838 def parse ( raw_text , options )
3939 raise BadResponseException ,
40- "CAS response is empty/blank." if raw_text . blank ?
40+ "CAS response is empty/blank." if raw_text . to_s . empty ?
4141 @parse_datetime = Time . now
4242 if raw_text =~ /^(yes|no)\n (.*?)\n $/m
4343 @protocol = 1.0
@@ -89,7 +89,7 @@ def parse(raw_text, options)
8989 end
9090
9191 def parse_extra_attribute_value ( value , encode_extra_attributes_as )
92- attr_value = if value . blank ?
92+ attr_value = if value . to_s . empty ?
9393 nil
9494 elsif !encode_extra_attributes_as
9595 begin
@@ -140,7 +140,7 @@ def initialize(raw_text, options={})
140140
141141 def parse ( raw_text )
142142 raise BadResponseException ,
143- "CAS response is empty/blank." if raw_text . blank ?
143+ "CAS response is empty/blank." if raw_text . to_s . empty ?
144144 @parse_datetime = Time . now
145145
146146 @xml = check_and_parse_xml ( raw_text )
@@ -214,7 +214,7 @@ def parse_http_response(http_response)
214214 end
215215
216216 def is_success?
217- !@failure && !ticket . blank ?
217+ !@failure && !ticket . to_s . empty ?
218218 end
219219
220220 def is_failure?
0 commit comments