Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Separate the cases into two statements
- @counter ||= 0
- @counter += 1
- # Separate the cases into one conditional
- @counter = @counter ? (@counter + 1) : 1
- # Does not work
- (@counter ||= 0) += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement