Module: MPatch::Integer

Defined in:
lib/mpatch/integer.rb

Instance Method Summary collapse

Instance Method Details

#each(&block) ⇒ Object

because for i in integer/fixnum not working, here is a little patch



7
8
9
10
11
# File 'lib/mpatch/integer.rb', line 7

def each &block
  self.times do |number|
    block.call   number
  end
end