Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hash slices not working with Array or GatherIterator #1818

Closed
p6rt opened this issue Jun 9, 2010 · 6 comments
Closed

Hash slices not working with Array or GatherIterator #1818

p6rt opened this issue Jun 9, 2010 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Jun 9, 2010

Migrated from rt.perl.org#75636 (status was 'resolved')

Searchable as RT75636$

@p6rt
Copy link
Author

p6rt commented Jun 9, 2010

From @bbkr

Erlangen build​:

# testing with Array
perl6 -e 'my @​t=1,2; my %h; %h{@​t}="one","two"; say %h.perl'
{"1 2" => ("one", "two")}

# testing with GatherIterator
perl6 -e 'my %h; %h{"12".comb(/(\d)/)}="one","two"; say %h.perl'
{"" => ("one", "two")}

In both cases it should be​:
{1 => "one", 2 => "two"}

@p6rt
Copy link
Author

p6rt commented Jun 18, 2010

From @bbkr

On Kiev build

[12​:51] <bbkr> rakudo​: my @​t=1,2; my %h; %h{@​t}="one","two"; say %h.perl
[12​:51] <p6eval> rakudo 6ec169​: OUTPUT«{"1" => "one", "2" => "two"}â�¤Â»
[12​:52] <bbkr> rakudo​: my %h; %h{"12".comb(/(\d)/)}="one","two"; say
%h.perl # test with GatherIterator
[12​:52] <p6eval> rakudo 6ec169​: OUTPUT«{"1" => "one", "2" => "two"}â�¤Â»

I need to find where put tests..

@p6rt
Copy link
Author

p6rt commented Jun 18, 2010

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jun 18, 2010

From @bbkr

t/spec/S32-hash/slice.t

i'll add tests soon

@p6rt
Copy link
Author

p6rt commented Jun 23, 2010

From @bbkr

{ my %hash;

  %hash{(1,2)} = "one", "two";
  is %hash, {"1" => "one", "2" => "two"},
  "assigning a slice using keys from Parcel";

  %hash{Array.new(1,2)} = "one", "two";
  is %hash, {"1" => "one", "2" => "two"},
  "assigning a slice using keys from Array";

  %hash{"12".comb(/(\d)/)} = "one", "two";
  is %hash, {"1" => "one", "2" => "two"},
  "assigning a slice using keys from GatherIterator";
}

@p6rt
Copy link
Author

p6rt commented Jun 23, 2010

@bbkr - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jun 23, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant