lib/bubble-wrap/http.rb in bubble-wrap-0.3.0 vs lib/bubble-wrap/http.rb in bubble-wrap-0.3.1
- old
+ new
@@ -71,10 +71,10 @@
self.instance_variable_set("@#{k}", v)
end
end
def ok?
- status_code == 200
+ status_code.to_s =~ /20\d/ ? true : false
end
end
# Class wrapping NSConnection and often used indirectly by the BubbleWrap::HTTP module methods.