Class: Fixnum

Inherits:
Object
  • Object
show all
Defined in:
lib/compatibility/fixnum.rb

Overview

Ruby 2.2.2 doesn’t support Fixnum#positive?, so monkey patch it.

Instance Method Summary collapse

Instance Method Details

#positive?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/compatibility/fixnum.rb', line 3

def positive?
  self > 0
end