# Step can't be 0 by (0..10).step(0.9)

**URL:** <https://www.ruby-forum.com/t/step-cant-be-0-by-0-10-step-0-9/136367>\
**Category:** Development\
**Created:** [May 1, 2008, 9:36am UTC](https://www.ruby-forum.com/t/step-cant-be-0-by-0-10-step-0-9/136367 "2008-05-01T09:36:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tanaka\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c67d28/32.png) [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Post date:** [May 1, 2008, 9:36am UTC](https://www.ruby-forum.com/t/step-cant-be-0-by-0-10-step-0-9/136367/1 "2008-05-01T09:36:00Z")

</div>

e$B0J2\<$N$h$&$K!"e(B(0…10).step(0.9) {|x| p x }  
e$B$,Nc30$K$J$j$^$9!#e(B

% ./ruby -ve ‘(0…10).step(0.9) {|x| p x }’  
ruby 1.9.0 (2008-05-01 revision 16250) [i686-linux]  
-e:1:in `step': step can't be 0 (ArgumentError) from -e:1:in`’

e$B$7$+$7e(B 1.1 e$B$K$9$k$HF0$/$N$G!"e(B0.9  
e$B$N5sF0$O0U?^$;$6$k$b$N$J$se(B  
e$B$8$c$J$$$G$7$g$&$+!#e(B

% ./ruby -ve ‘(0…10).step(1.1) {|x| p x }’  
ruby 1.9.0 (2008-05-01 revision 16250) [i686-linux]  
0  
1.1  
2.2  
3.3  
4.4  
5.5  
6.6  
7.7  
8.8  
9.9
