Project

General

Profile

Actions

Bug #2401

closed

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

Added by knu (Akinori MUSHA) about 15 years ago. Updated over 13 years ago.

Status:
Closed
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

Actions #1

Updated by shyouhei (Shyouhei Urabe) about 15 years ago

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

=begin

=end

Actions #2

Updated by nobu (Nobuyoshi Nakada) almost 15 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

Actions

Also available in: Atom PDF

Like0
Like0Like0