# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #75948]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75948 >


<pmichaud> rakudo:  say  ('  xyz ' ~~ /.*/).trim
<p6eval> rakudo 7b5b9d: OUTPUT«any(Match.new(␤ # WARNING: this is not
working perl code␤ # and for debugging purposes only␤ from => 2,␤ orig
=> "  xyz ",␤ to => 6,␤ positional => [␤,␤  ],␤))␤»
<moritz_> wtf is calling .perl here?
<pmichaud> rakudo:  say  ('  xyz ' ~~ /.*/).Str.trim
<p6eval> rakudo 7b5b9d: OUTPUT«xyz␤»
<pmichaud> something is wrong with .trim somewhere in the Match hierarchy.
<pmichaud> ohhhhhhhh
<pmichaud> evil
<pmichaud>         if self ~~ /^\s*:(.*)$/ {
<moritz_> Cool.trim calls a regex match  self ~~ $some_regex
<pmichaud> right
<pmichaud> it needs to stringify first
<pmichaud> it can't assume that self is a str
<jnthn> pmichaud: I ran into a related issue the other day
<jnthn> pmichaud: Should Regex.ACCEPTS always stringify?
<jnthn> pmichaud: Before matching?
<jnthn> pmichaud: I almost did it but then it felt rong.
<pmichaud> jnthn: I'd prefer it not do that
<pmichaud> the problem isn't with the ~~, it's that anything in
Cool-str.pm  needs make sure to be stringifying self
<jnthn> pmichaud: OK.
<pmichaud> (at least in this case)
* masak submits rakudobug

Reply via email to