rakudo / rakudo

🦋 Rakudo – Raku on MoarVM, JVM, and JS
https://rakudo.org/
Artistic License 2.0
1.72k stars 373 forks source link

The Str.succ method on 1, ¹, ⒈ and ① works differently #3379

Open kalkin opened 4 years ago

kalkin commented 4 years ago

The Problem

say "1".succ;
say "¹".succ;
say "⒈".succ;
say "①".succ;

Expected Behavior

2 ² ⒉ ②

Actual Behavior

2 ¹ ⒈ ②

Environment

There're were guesses in #raku based on unival, but we couldn't find any logic behind it. Is this a bug or a feauture?

lizmat commented 4 years ago

It's magic.

Really.

The character ranges that have magic .succ and .pred behaviour are hand selected. This has apparently not been done for these ranges.

I suggest you collect the ranges that you think are missing, and we can then add them relatively easy.

colomon commented 4 years ago

"1.".succ 2.

That's in my default perl6, which is...

This is Rakudo version 2018.12 built on MoarVM version 2018.12 implementing Perl 6.d.

Maybe regression here? (Honestly I wouldn't have expected it to work.)

On Mon, Dec 23, 2019 at 2:33 PM Elizabeth Mattijsen < notifications@github.com> wrote:

It's magic.

Really.

The character ranges that have magic .succ and .pred behaviour are hand selected. This has apparently not been done for these ranges.

I suggest you collect the ranges that you think are missing, and we can then add them relatively easy.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rakudo/rakudo/issues/3379?email_source=notifications&email_token=AAANN2B7TRV3VFAN6L6J7BDQ2EG7JA5CNFSM4J6XJQC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHRZFWI#issuecomment-568562393, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAANN2HVHCHMLYWBXHAHJH3Q2EG7JANCNFSM4J6XJQCQ .

-- Solomon Foster: colomon@gmail.com HarmonyWare, Inc: http://www.harmonyware.com

kalkin commented 4 years ago

@colomon You are confusing 1. with the latter one is DIGIT ONE FULL STOP