Project

General

Profile

Bug #2401

Array splat bug: a=[1,2]; p [*a] #=> []

Added by knu (Akinori MUSHA) over 8 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 1.8.8dev (2009-11-24 revision 25903) [x86_64-freebsd7]
[ruby-dev:39771]

Description

=begin
a=[1,2]; p [*a] #=> []
となってしまいます。

parse.yを見たんですが、argsとargs2の使い分けがよく分かりません。
(r25658の前は同じだったように見えます)

when_argsを復活させるのが近道なんですかねえ。

なお、もちろんtest-allは必要ですが、
test/ruby/test_array.rb
test/ruby/test_case.rb
test/ruby/test_assignment.rb
あたりで基本的なチェックはできます。
=end

History

#1 Updated by shyouhei (Shyouhei Urabe) over 8 years ago

  • Status changed from Open to Assigned
  • Assignee set to nobu (Nobuyoshi Nakada)

=begin

=end

#2 Updated by nobu (Nobuyoshi Nakada) over 8 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r26160.
Akinori, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Also available in: Atom PDF