Actions
Bug #3854
closedAdress to str[str.size] is now valid?
Description
=begin
C:\Users\Naki>irb
irb(main):001:0> s = ''; 10.times { s[s.size]='-' }; s
=> "----------"
irb(main):002:0> RUBY_DESCRIPTION
=> "ruby 1.9.2p0 (2010-08-18) [i386-mingw32]"
C:\Documents and Settings_Oo>irb
irb(main):001:0> s = ''; 10.times { s[s.size]='-' }; s
IndexError: index 0 out of string
from (irb):1:in []=' from (irb):1 from (irb):1:in
times'
from (irb):1
irb(main):002:0> RUBY_VERSION
=> "1.8.6"
irb(main):003:0> RUBY_PATCHLEVEL
=> 287
=end
Actions
Like0
Like0