# New Ticket Created by  Ira Byerly 
# Please include the string:  [perl #100552]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=100552 >


Hi,

I was trying  to figure out why the first example in Chapter 3 of Using Perl
6 no longer works. It hung up at the line

   printf $format, .key, 'X' x ($unit * .value)

apparently due to $unit being a Rat, as here:

    perl6: say "X" x 22
    pugs, rakudo af0d2e, niecza v10-34-gb08643d:
OUTPUT«XXXXXXXXXXXXXXXXXXXXXX␤»

    perl6: say "X" x 22.0
    rakudo af0d2e: OUTPUT«(timeout)»
    ..pugs, niecza v10-34-gb08643d: OUTPUT«XXXXXXXXXXXXXXXXXXXXXX␤»

Snarkyboojum noted that it wasn't broken in b (the old master branch.)

If I change the last definintion of infix:<x> in src/core/Stringy.pm from

    multi infix:<x>($s, $n)        { $s.Stringy x $n.Numeric }

to

    multi infix:<x>($s, $n)        { $s.Stringy x $n.Int }

it appears to fix the problem...

    $ ./perl6
    > "X" x 22
   XXXXXXXXXXXXXXXXXXXXXX
    > "X" x 22.0
    XXXXXXXXXXXXXXXXXXXXXX

I did check that a simple "make test" isn't broken, but I won't have a
chance to pursue it any more this week due to $work, alas...

Best regards,
Ira Kevin Byerly
quester_

Reply via email to