(1..5).step(SimpleDelegator.new(Rational(3,2))) {|x| p x }

Range#step e$B$G!"0z?t$Ke(B Rational(3,2) e$B$rM?$($?>l9g$He(B
SimpleDelegator.new(Rational(3,2)) e$B$rM?$($?>l9g$G7k2L$,0J2<e(B
e$B$N$h$&$K0[$J$k$N$OJQ$G$O$J$$$G$7$g$&$+!#e(B

% ./ruby -v -rdelegate -e
‘(1…5).step(SimpleDelegator.new(Rational(3,2))) {|x| p x }’
ruby 1.9.0 (2008-05-22 revision 16533) [i686-linux]
/home/akr/ruby/yarvo0/lib/ruby/1.9.0/delegate.rb:225: warning: instance
variable @delegate_sd_obj not initialized
1
2
3
4
5

% ./ruby -ve ‘(1…5).step(Rational(3,2)) {|x| p x }’
ruby 1.9.0 (2008-05-22 revision 16533) [i686-linux]
1
Rational(5, 2)
Rational(4, 1)