It seems that rand(range) with a float range doesn't have the same understanding of an inclusive range.
With current mruby master:
srand(0); 1000.times.map { rand(1.0..2.0) }.select { |n| n > 2.0 }.size
=> 492
With Ruby 4.0.1:
srand(0); 1000.times.map { rand(1.0..2.0) }.select { |n| n > 2.0 }.size
=> 0
It seems that
rand(range)with a float range doesn't have the same understanding of an inclusive range.With current mruby master:
With Ruby 4.0.1: