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

Match object, 'split' method generates Strings, not Perl6Str #135

Closed
p6rt opened this issue Jun 17, 2008 · 7 comments
Closed

Match object, 'split' method generates Strings, not Perl6Str #135

p6rt opened this issue Jun 17, 2008 · 7 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 17, 2008

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

Searchable as RT55962$

@p6rt
Copy link
Author

p6rt commented Jun 17, 2008

From @cjfields

This is actually two separate bugs; should we split these? Match is
returning a String, not a Perl6Str. Similarly, split() is also
returning a String. Notably Rakudo's Str.pir split() definition
indicates that a List of Perl6Str is supposed to be returned.

In both examples below, I try to increment the string​:

cjfields​:tests cjfields$ perl6 -v
This is Rakudo Perl 6, revision 28487 built on parrot 0.6.3-devel
for darwin-2level.

Copyright 2006-2008, The Perl Foundation.

cjfields​:tests cjfields$ perl6

regex Test {(A)(D)}; 'AD' ~~ Test; my $a = $0; my $d = $1; say $a..
$d;
[oops; continuation 0x1a087c4 of type 21 is trying to jump from
runloop 1208 to runloop 98]
increment() not implemented in class 'String'
my @​foo = 'AB'.split(''); say @​foo; @​foo[0]++;
AB
increment() not implemented in class 'String'

@p6rt
Copy link
Author

p6rt commented Jun 18, 2008

From @pmichaud

On Tue, Jun 17, 2008 at 03​:18​:40PM -0700, Chris Fields wrote​:

# New Ticket Created by Chris Fields
# Please include the string​: [perl #​55962]
# in the subject line of all future correspondence about this issue.
# <URL​: http://rt.perl.org/rt3/Ticket/Display.html?id=55962 >

This is actually two separate bugs; should we split these? Match is
returning a String, not a Perl6Str. Similarly, split() is also
returning a String. Notably Rakudo's Str.pir split() definition
indicates that a List of Perl6Str is supposed to be returned.

Many of these issues will hopefully be resolved when we switch Rakudo
to using .HLL . My plan is to wait for .HLL mapping before trying
to address this directly (I expect .HLL mapping will happen in the
next couple of weeks).

Pm

@p6rt
Copy link
Author

p6rt commented Jun 18, 2008

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

@p6rt
Copy link
Author

p6rt commented Jun 18, 2008

From @cjfields

On Wed Jun 18 15​:27​:38 2008, pmichaud wrote​:

On Tue, Jun 17, 2008 at 03​:18​:40PM -0700, Chris Fields wrote​:

# New Ticket Created by Chris Fields
# Please include the string​: [perl #​55962]
# in the subject line of all future correspondence about this issue.
# <URL​: http://rt.perl.org/rt3/Ticket/Display.html?id=55962 >

This is actually two separate bugs; should we split these? Match is
returning a String, not a Perl6Str. Similarly, split() is also
returning a String. Notably Rakudo's Str.pir split() definition
indicates that a List of Perl6Str is supposed to be returned.

Many of these issues will hopefully be resolved when we switch Rakudo
to using .HLL . My plan is to wait for .HLL mapping before trying
to address this directly (I expect .HLL mapping will happen in the
next couple of weeks).

Pm

Agreed (got caught up on #parrot logfile).

@p6rt
Copy link
Author

p6rt commented Dec 24, 2008

From @pmichaud

The latter issue is now fixed in r34324​:

$ ./parrot perl6.pbc

my @​foo = 'AB'.split(''); @​foo[0]++; say @​foo;
BB

The other issue with match objects depends on how one invokes a named
regex; I'm going to say we don't worry about that until we get a
clarification on the spec.

So, this issue seems to be fixed -- I'm assigning the ticket to moritz++
so we can make sure a good test case is in the spectest suite. After
that this ticket can be closed.

Thanks!

Pm

@p6rt
Copy link
Author

p6rt commented Dec 27, 2008

From @moritz

On Wed Dec 24 02​:02​:26 2008, pmichaud wrote​:

The latter issue is now fixed in r34324​:

$ ./parrot perl6.pbc

my @​foo = 'AB'.split(''); @​foo[0]++; say @​foo;
BB

The other issue with match objects depends on how one invokes a named
regex; I'm going to say we don't worry about that until we get a
clarification on the spec.

So, this issue seems to be fixed -- I'm assigning the ticket to moritz++
so we can make sure a good test case is in the spectest suite. After
that this ticket can be closed.

tested in t/spec/integration/real-strings.t, I also added the
example above as a test.

Cheers,
Moritz

@p6rt
Copy link
Author

p6rt commented Dec 27, 2008

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

@p6rt p6rt closed this as completed Dec 27, 2008
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant