Skip to content

Instantly share code, notes, and snippets.

@apeiros
Created November 24, 2016 19:02
Show Gist options
  • Save apeiros/d1a7ac3d3f313a804b1536eb3f867910 to your computer and use it in GitHub Desktop.
Save apeiros/d1a7ac3d3f313a804b1536eb3f867910 to your computer and use it in GitHub Desktop.
## 1
if @id == -1
@id = sent_id
else
raise CallError.new("Sent id does not match previous id") if @id != sent_id
end
## 2
@id = sent_id if @id == -1
raise CallError.new("Sent id does not match previous id") if @id != sent_id
## 3
if @id == -1
@id = sent_id
elsif @id != sent_id
raise CallError.new("Sent id does not match previous id")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment