lib/twilio-ruby/rest/chat/v1.rb in twilio-ruby-5.0.0.rc24 vs lib/twilio-ruby/rest/chat/v1.rb in twilio-ruby-5.0.0.rc25

- old
+ new

@@ -16,18 +16,22 @@ @credentials = nil @services = nil end def credentials(sid=:unset) - if sid == :unset + if sid.nil? + raise ArgumentError, 'sid cannot be nil' + elsif sid == :unset @credentials ||= CredentialList.new self else CredentialContext.new(self, sid) end end def services(sid=:unset) - if sid == :unset + if sid.nil? + raise ArgumentError, 'sid cannot be nil' + elsif sid == :unset @services ||= ServiceList.new self else ServiceContext.new(self, sid) end end \ No newline at end of file