Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integer#even? and Integer#odd? are not needed for Ruby >= 1.8.7
- Loading branch information
Showing
6 changed files
with
7 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
require 'active_support/core_ext/integer/even_odd' | ||
require 'active_support/core_ext/integer/multiple' | ||
require 'active_support/core_ext/integer/inflections' | ||
require 'active_support/core_ext/integer/time' |
16 changes: 0 additions & 16 deletions
16
activesupport/lib/active_support/core_ext/integer/even_odd.rb
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
activesupport/lib/active_support/core_ext/integer/multiple.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class Integer | ||
# Check whether the integer is evenly divisible by the argument. | ||
def multiple_of?(number) | ||
self % number == 0 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters