Skip to content
Permalink
Browse files

Merge pull request #647 from kachick/implement-integer-even,odd

Implement Integer#even?, Integer#odd?
  • Loading branch information
alex committed Apr 20, 2013
2 parents dece7d4 + 691aaf5 commit 58e722c7087fc9deda13730a0cbbea8a5e1a5355
Showing with 8 additions and 2 deletions.
  1. +8 −0 lib-topaz/integer.rb
  2. +0 −1 spec/tags/core/integer/even_tags.txt
  3. +0 −1 spec/tags/core/integer/odd_tags.txt
@@ -26,4 +26,12 @@ def next
def pred
return self - 1
end

def even?
(self % 2).zero?
end

def odd?
!even?
end
end

This file was deleted.

This file was deleted.

0 comments on commit 58e722c

Please sign in to comment.
You can’t perform that action at this time.