Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove usage of ActiveSupport's #present? method (fixes #253)
Replaces it with #empty?
- Loading branch information
ae53708
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while data.present?
anduntil data.empty?
are not the same.present?
exists onNil
andString
. So, the more correct version would be:ae53708
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's true that
#present?
is semantically different, although that's irrelevant here as data will never benil
.Also it seems the main escape clause is the
break
a few lines down...ae53708
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. Sorry. Indeed. Next time will try to read full code before making any judgements :D
Thanks for clearing this out!