Bug #2951
closed
- Status changed from Open to Rejected
=begin
It iterates (99990-1001) * 1000 + 1 = 98989001 times.
So it will nearly stopped.
=end
=begin
ruby 1.8.7-p249 is minor of 0 seconds example
start_time = Time.now; ("01001-000".."99990-000").include? ""; puts Time.now - start_time
1.4e-05
=> nil
ruby 1.9.1
/usr/local/ruby-1.9.1-p378/bin/irb
irb(main):001:0> start_time = Time.now; ("01001-000".."99990-000").include? ""; puts Time.now - start_time
80.55897691
=> nil
Because ruby 1.8.7's extremely fast and ruby 1.9.1 is so slow?
This is a bug !
=end
=begin
I used the method Range#cover? and now had the behavior I expected !
start_time = Time.now; ("01001-000".."99990-000").cover? ""; puts Time.now - start_time
2.1022e-05
=> nil
Tank's
Alexandre Riveira
=end
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0