Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #112996] sequence deduction tries to convert strings to numbers, should not

1 view
Skip to first unread message

Moritz Lenz

unread,
May 19, 2012, 1:31:18 AM5/19/12
to bugs-bi...@rt.perl.org
# New Ticket Created by Moritz Lenz
# Please include the string: [perl #112996]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=112996 >


< moritz> r: say ('1a' ... *)[^5]
<+p6eval> rakudo 45679a: OUTPUT«1a 1b 1c 1d 1e␤»
< moritz> r: say ('1a', '1b' ... *)[^5]
<+p6eval> rakudo 45679a: OUTPUT«Cannot convert string to number:
trailing characters after number in '1⏏b' (indicated by ⏏)␤
in method Numeric at src/gen/CORE.setting:9058␤
in sub infix:<-> at src/gen/CORE.setting:2381␤
in sub infix:<-> at src/gen/CORE.setting:2381␤

I'd argue that the sequence operator should never try to do arithmetic
with strings; it can fail, and it does.
0 new messages