I think there might be a bug in the way delete_at works.
a = [1,2]
a.delete_at(1)
=> 2
a.delete_at(1)
RangeError: Specified argument was out of the range of valid values.
Parameter name: index
from :0:in delete_at' from (irb):38 from :0:in
eval’
from workspace.rb:80:in evaluate' from context.rb:217:in
evaluate’
from irb.rb:147:in eval_input' from irb.rb:257:in
signal_status’
from irb.rb:146:in eval_input' from ruby-lex.rb:230:in
each_top_level_statement’
from :0:in loop' from c:/IronRuby/lib/ruby/1.8/irb.rb:146:in
eval_input’
from c:/IronRuby/lib/ruby/1.8/irb.rb:70:in start' from :0:in
catch’
from c:/IronRuby/lib/ruby/1.8/irb.rb:69:in start' from c:/IronRuby/bin/iirb:13 from :0:in
catch’
a.delete_at(2)
=>nil
The a.delete_at(1) should return nil, but it is throwing an exception.
Is that correct?
Thanks,
Randall