From: Phrogz Date: 2009-10-31T07:35:04+09:00 Subject: Re: How do you get the tail end of a string? On Oct 30, 10:40 am, Bertram Scharpf wrote: >   irb(main):001:0> def timer ; start = Time.now ; yield ; Time.now - start ; end >   => nil >   irb(main):002:0> index = 2 >   => 2 >   irb(main):003:0> timer do 100_000.times { "hello"[-index..-1] } end >   => 0.888826 >   irb(main):004:0> timer do 100_000.times { "hello".tail index } end >   => 0.21357 > > Your calculation needs more than four times as much processor > time. Don't you need to save time? Really? You're arguing about the efficiency of something that is about 6.8µs slower? I don't personally need to save the time. Nor do you, unless you have a real-world program using this method that you have benchmarked and found this particular method call to be a significant portion of your execution time.