Q:

How to print first 10 natural numbers who's square is divisible by 5?

I am looking at this slideshow at the moment:
http://www.slideshare.net/GeisonFlores/ruby-functional-programming
Slide 24 shows that I can find the first 10 natural numbers who's square is divisible by 5 by doing this:
Integer::natural.select{ |x| x**2 % 5 == 0}.take(10).inject(:+)

I get the error: cannot find type 'natural' for Integer.
I have tried to using ruby 1.9.3 and 2.2 and can't seem to run this LOC.
Can anyone point me to how I can correct this?
I am new to FP.

A:

Integer::natural is defined on other slide. Run this code before executing the select:
class Integer
 def self.natural
   Enumerator.new do |yielder|
    (1..1.0/0).each do |number|
     yielder.yield number
    end
   end
 end
end

