# New Ticket Created by Will Coleda # Please include the string: [perl #45659] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=45659 >
These tests started failing in the past few months, and I TODO'd them: [string is double .1] should return 1 (true), it's currently returning 0 (false) The problem is with the following __number() PIR method in runtime/ conversions.pir; this is supposed to take an arbitrary PMC, use PGE to see if it parses as a number, and if so, return a HLL var of the appropriate type (TclFloat or TclInt). Once we're sure it's a number, the code is: .local string className .local pmc value className = ast['class'] # for .1, this is a TclFloat value = ast['value'] # the String ".1" number = new className # Creates a TclFloat assign number, value # GAH! number is now of type TclString! .return(number) So, we end up returning a string-like PMC containing the text ".1" instead of (as we did before), a num-like PMC containing the value . 1. The code that checks the conversion of the string .1 into a number sees it's not a Float and says "nope, not a double." So, what changed? Was it the assign opcode, was it the way the PMC compiler figures out the default action for the vtable assignment? -- Will "Coke" Coleda [EMAIL PROTECTED]