Project

General

Profile

Actions

Bug #408

closed

Array#[]= 要素数が減るとき

Added by shyouhei (Shyouhei Urabe) over 15 years ago. Updated almost 13 years ago.

Status:
Rejected
Target version:
-
ruby -v:
Backport:

Description

=begin
以下のように謎のnilが半端に残ります

trunk/bin/ruby -ve'a = %w"A B C D E"; a[-2, 2] = nil; p a'
ruby 1.9.0 (2008-08-06 revision 17576) [x86_64-linux]
["A", "B", "C", nil]

なお1.8では残りません。

ruby_1_8/bin/ruby -ve'a = %w"A B C D E"; a[-2, 2] = nil; p a'
ruby 1.8.7 (2008-08-06 revision 17572) [x86_64-linux]
["A", "B", "C"]
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0