# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #126332] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=126332 >
<loren> m: my &f := &substr.assuming('hello world'); say f(0, 2); <camelia> rakudo-moar 70a94d: OUTPUT«hello world» <moritz> m: say &substr.assuming('hello world')(0, 2) <camelia> rakudo-moar 70a94d: OUTPUT«hello world» <moritz> wtf (the "w" stands for "weird", here) * moritz would have thought we had tests for assuming <moritz> m: sub my-substr(*@a) { substr |@a }; say &my-substr.assuming('hello, world')(1, 3) <camelia> rakudo-moar 70a94d: OUTPUT«ello, world» <moritz> so it only passes one more argument on to the original function? <FROGGS> maybe assuming does not work well with multies? <moritz> m: sub d(*@x) { say @x.perl }; &d.assuming('a', 'b')('c', 'd', 'e') <camelia> rakudo-moar 70a94d: OUTPUT«["a", "b", "c"]» <moritz> FROGGS: no <moritz> FROGGS: it ignores anything from the second argument onwards <FROGGS> m: multi f(1) {'a'}; multi f(1, 2) {'b'}; multi f(1, 2, 3) {'c'}; say &f.assuming(1)(2, 3) <camelia> rakudo-moar 70a94d: OUTPUT«b» <FROGGS> m: multi f(1) {'a'}; multi f(1, 2) {'b'}; multi f(1, 2, 3) {'c'}; say &f.assuming(1)(2, 3, 4) <camelia> rakudo-moar 70a94d: OUTPUT«b» <FROGGS> wow <moritz> who wants to write the bug report? * masak submits rakudobug