From 4ec33e0c7779468b3831cca5ad0a1b3200448a1a Mon Sep 17 00:00:00 2001 From: Felix Krause Date: Tue, 8 Oct 2013 15:04:14 +0200 Subject: [PATCH] Remove rails method 'blank?' --- lib/casclient/responses.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/casclient/responses.rb b/lib/casclient/responses.rb index f4044b76..89fdd579 100644 --- a/lib/casclient/responses.rb +++ b/lib/casclient/responses.rb @@ -37,7 +37,7 @@ def initialize(raw_text, options={}) def parse(raw_text, options) raise BadResponseException, - "CAS response is empty/blank." if raw_text.blank? + "CAS response is empty/blank." if raw_text.to_s.empty? @parse_datetime = Time.now if raw_text =~ /^(yes|no)\n(.*?)\n$/m @protocol = 1.0 @@ -89,7 +89,7 @@ def parse(raw_text, options) end def parse_extra_attribute_value(value, encode_extra_attributes_as) - attr_value = if value.blank? + attr_value = if value.to_s.empty? nil elsif !encode_extra_attributes_as begin @@ -140,7 +140,7 @@ def initialize(raw_text, options={}) def parse(raw_text) raise BadResponseException, - "CAS response is empty/blank." if raw_text.blank? + "CAS response is empty/blank." if raw_text.to_s.empty? @parse_datetime = Time.now @xml = check_and_parse_xml(raw_text) @@ -214,7 +214,7 @@ def parse_http_response(http_response) end def is_success? - !@failure && !ticket.blank? + !@failure && !ticket.to_s.empty? end def is_failure?