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

result of 'reverse'-ing, 'join'-ing a string not a 'Perl6Str' #94

Closed
p6rt opened this issue May 23, 2008 · 6 comments
Closed

result of 'reverse'-ing, 'join'-ing a string not a 'Perl6Str' #94

p6rt opened this issue May 23, 2008 · 6 comments

Comments

@p6rt
Copy link

p6rt commented May 23, 2008

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

Searchable as RT54724$

@p6rt
Copy link
Author

p6rt commented May 23, 2008

From @cjfields

Using 'reverse' returns a Str which is-a 'String', not a 'Perl6Str'.
Using the attached test script I get the following result​:

cjfields$ parrot ~/src/parrot/languages/perl6/perl6.pbc string.p6
$str is-a Str, is "Foo", has chars 3
$rev is-a Str, is "ooF", has chars Method 'chars' not found for
invocant of class 'String'
current instr.​: '_block11' pc 276 (EVAL_10​:78)
called from Sub 'parrot;PCT​::HLLCompiler;eval' pc 783 (src/PCT/
HLLCompiler.pir​:458)
called from Sub 'parrot;PCT​::HLLCompiler;evalfiles' pc 1065 (src/PCT/
HLLCompiler.pir​:587)
called from Sub 'parrot;PCT​::HLLCompiler;command_line' pc 1244 (src/
PCT/HLLCompiler.pir​:676)
called from Sub 'parrot;Perl6​::Compiler;main' pc 9794 (perl6.pir​:186)

cjfields$ svn info
Path​: .
URL​: https://svn.perl.org/parrot/trunk
Repository Root​: https://svn.perl.org/parrot
Repository UUID​: d31e2699-5ff4-0310-a27c-f18f2fbe73fe
Revision​: 27766
Node Kind​: directory
Schedule​: normal
Last Changed Author​: pmichaud
Last Changed Rev​: 27766
Last Changed Date​: 2008-05-23 11​:37​:13 -0500 (Fri, 23 May 2008)

@p6rt
Copy link
Author

p6rt commented May 23, 2008

From @cjfields

string.p6

@p6rt
Copy link
Author

p6rt commented May 24, 2008

From @cjfields

This appears to stem from problems with 'join' in Str.pir ('reverse' uses 'join'). The following is
test code demonstrating the problem​:

my $str = 'Foo';
my @​chars = $str.split('');
my $str2 = @​chars.join('');
say $str.chars;
say $str2.chars;

@p6rt
Copy link
Author

p6rt commented May 24, 2008

@cjfields - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented May 26, 2008

From @cjfields

fixed in r27818

@p6rt
Copy link
Author

p6rt commented May 26, 2008

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

@p6rt p6rt closed this as completed May 26, 2008
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