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

Assignment to $*OUT might fails for empty #3715

Closed
p6rt opened this issue Mar 4, 2015 · 4 comments
Closed

Assignment to $*OUT might fails for empty #3715

p6rt opened this issue Mar 4, 2015 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Mar 4, 2015

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

Searchable as RT123978$

@p6rt
Copy link
Author

p6rt commented Mar 4, 2015

From @Tux

$ perl6 -e 'use v6; $*OUT.nl = "\n";'
$ perl6 -e 'use v6; $*OUT.nl = "\r\n";'
$ perl6 -e 'use v6; $*OUT.nl = "\r";'
$ perl6 -e 'use v6; $*OUT.nl = "\x[2424]";'
$ perl6 -e 'use v6; $*OUT.nl = "\x[2424]\r\n";'
$ perl6 -e 'use v6; $*OUT.nl = "";'
Invalid string index​: max 4294967295, got 4294967295
  in block at src/gen/m-CORE.setting​:16933
  in block <unit> at -e​:1

$ perl6 -e 'use v6; $*OUT.nl = Str;'
Cannot unbox a type object
  in block at src/gen/m-CORE.setting​:16933
  in block <unit> at -e​:1

$

I think I understand why undefined should not be allowed, but an empty
string should not fail

--
H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.21 porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/

@p6rt
Copy link
Author

p6rt commented Sep 3, 2017

From @skids

On Tue, 03 Mar 2015 23​:34​:02 -0800, hmbrand wrote​:

$ perl6 -e 'use v6; $*OUT.nl = "\n";'
$ perl6 -e 'use v6; $*OUT.nl = "\r\n";'
$ perl6 -e 'use v6; $*OUT.nl = "\r";'
$ perl6 -e 'use v6; $*OUT.nl = "\x[2424]";'
$ perl6 -e 'use v6; $*OUT.nl = "\x[2424]\r\n";'
$ perl6 -e 'use v6; $*OUT.nl = "";'
Invalid string index​: max 4294967295, got 4294967295
in block at src/gen/m-CORE.setting​:16933
in block <unit> at -e​:1

$ perl6 -e 'use v6; $*OUT.nl = Str;'
Cannot unbox a type object
in block at src/gen/m-CORE.setting​:16933
in block <unit> at -e​:1

$

I think I understand why undefined should not be allowed, but an empty
string should not fail

The method for this changed to ".nl-out" after the IO refactor, and setting
it to "" works fine now, and this is already tested for in S32-io/io-handle.t.

Marking this ticket as resolved.

@p6rt
Copy link
Author

p6rt commented Sep 3, 2017

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

@p6rt
Copy link
Author

p6rt commented Sep 3, 2017

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

@p6rt p6rt closed this as completed Sep 3, 2017
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