In Ruby this is not used, better use this:
```ruby
(1..number).each do |num|
  ...
end
```