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

IO::Path.new argument error #5265

Closed
p6rt opened this issue Apr 25, 2016 · 6 comments
Closed

IO::Path.new argument error #5265

p6rt opened this issue Apr 25, 2016 · 6 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Apr 25, 2016

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

Searchable as RT127989$

@p6rt
Copy link
Author

p6rt commented Apr 25, 2016

From @MadcapJake

If you provide more than one argument to IO​::Path.new it returns​: "Default constructor for 'IO​::Path' only takes named arguments", which is not true because it accepts strings, IOs, and even numbers. Just not multiple arguments.

@p6rt
Copy link
Author

p6rt commented Apr 26, 2016

From @MadcapJake

Here's a quick REPL runthrough of the error message and some arguments​:

<pre><code>> IO​::Path.new​: 'a'
"/home/jrusso/a".IO

IO​::Path.new​: 'a', 'b'
Default constructor for 'IO​::Path' only takes named arguments
  in block <unit> at <unknown file> line 1

IO​::Path.new​: 1
"/home/jrusso/1".IO
IO​::Path.new​: [1, 2]
"/home/jrusso/1 2".IO
IO​::Path.new​: 1, 2
Default constructor for 'IO​::Path' only takes named arguments
  in block <unit> at <unknown file> line 1</code></pre>

On Mon Apr 25 10​:18​:41 2016, madcap.russo+p6@​gmail.com wrote​:

If you provide more than one argument to IO​::Path.new it returns​:
"Default constructor for 'IO​::Path' only takes named arguments", which
is not true because it accepts strings, IOs, and even numbers. Just
not multiple arguments.

@p6rt
Copy link
Author

p6rt commented Apr 26, 2016

From @MadcapJake

Wow, thought that RT could handle a pre code block. Here's the text without any gimmickry​:

IO​::Path.new​: 'a'
"/home/jrusso/a".IO
IO​::Path.new​: 'a', 'b'
Default constructor for 'IO​::Path' only takes named arguments
  in block <unit> at <unknown file> line 1

IO​::Path.new​: 1
"/home/jrusso/1".IO
IO​::Path.new​: [1, 2]
"/home/jrusso/1 2".IO
IO​::Path.new​: 1, 2
Default constructor for 'IO​::Path' only takes named arguments
  in block <unit> at <unknown file> line 1

On Tue Apr 26 12​:17​:05 2016, madcap.russo+p6@​gmail.com wrote​:

Here's a quick REPL runthrough of the error message and some arguments​:

<pre><code>> IO​::Path.new​: 'a'
"/home/jrusso/a".IO

IO​::Path.new​: 'a', 'b'
Default constructor for 'IO​::Path' only takes named arguments
in block <unit> at <unknown file> line 1

IO​::Path.new​: 1
"/home/jrusso/1".IO
IO​::Path.new​: [1, 2]
"/home/jrusso/1 2".IO
IO​::Path.new​: 1, 2
Default constructor for 'IO​::Path' only takes named arguments
in block <unit> at <unknown file> line 1</code></pre>

On Mon Apr 25 10​:18​:41 2016, madcap.russo+p6@​gmail.com wrote​:

If you provide more than one argument to IO​::Path.new it returns​:
"Default constructor for 'IO​::Path' only takes named arguments", which
is not true because it accepts strings, IOs, and even numbers. Just
not multiple arguments.

@p6rt
Copy link
Author

p6rt commented Jul 18, 2016

From @zoffixznet

Thank you for the report.

Fixed in rakudo/rakudo@9d3b6d0731

Tests added in Raku/roast@5f54695

@p6rt
Copy link
Author

p6rt commented Jul 18, 2016

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

@p6rt
Copy link
Author

p6rt commented Jul 18, 2016

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

@p6rt p6rt closed this as completed Jul 18, 2016
@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant