Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update a style guide for "Float Division"
This PR updates a style guide for "Float Division". The original issue for which this style was proposed. rubocop#628 It is an update based on the following argument. rubocop/rubocop#7153 (comment) The following is a quote from the argument about the reason for this change. > I wanted to show the following option to make a bad case only when both have `to_f`. > > ```ruby > # bad > a.to_f / b.to_f > > # good > a.to_f / b > a / b.to_f > a.fdiv(b) > ``` > > Whether `to_f` is used on the left or right depends on the nature of `a` > or `b` parameter. On the other hand, it is redundant that `to_f` is used > in both. At that time, I think it is better to let users choose whether > to remove the left side `to_f` or the right side `to_f`. This is the > reason I recommend this option to default.
- Loading branch information