--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Invokes block with the sequence of numbers starting at num, incremented by step on each call. The loop finishes when the value to be passed to the block is greater than limit (if step is positive) or less than limit (if step is negative). If all the arguments are integers, the loop operates using an integer counter. If any of the arguments are floating point numbers, all are converted to floats, and the loop is executed floor(n + n*epsilon)+ 1 times, where n = (limit - num)/step. Otherwise, the loop starts at num, uses either the < or > operator to compare the counter against limit, and increments itself using the + operator. - !ruby/struct:SM::Flow::VERB body: " 1.step(10, 2) { |i| print i, " " }\n Math::E.step(Math::PI, 0.2) { |f| print f, " " }\n" - !ruby/struct:SM::Flow::P body: produces: - !ruby/struct:SM::Flow::VERB body: " 1 3 5 7 9\n 2.71828182845905 2.91828182845905 3.11828182845905\n" full_name: Numeric#step is_singleton: false name: step params: | num.step(limit, step ) {|i| block } => num visibility: public