Uploaded image for project: 'Railo'
  1. Railo
  2. RAILO-3029

listSome() seems to exit prematurely?

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.2.0.007
    • Fix Version/s: None
    • Labels:
      None

      Description

      Repro:

      rainbow = "whero,karaka,kowhai,kakariki,kikorangi,tawatawa,mawhero"
      result = rainbow.some(function(element,index){
          echo("Checking: #element#; ")
          var vowels = element.reReplaceNoCase("[^aeiou]", "", "all")
          var vowelsLen = vowels.len()
          echo("#vowels#: #vowelsLen#; #vowelsLen >= 4#<br>")
          return vowelsLen >= 4
      })
      
      echo("Some maori colours have at least four vowels in them: #result#<br>")
      

      Output:

      Checking: whero; eo: 2; false
      Checking: karaka; aaa: 3; false
      Checking: kowhai; oai: 3; false
      Some maori colours have at least four vowels in them: true
      

      As far as I can tell... there should also be a line:

      kakariki; aaii: 4; true
      

      ?

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                micstriit Michael Offner
                Reporter:
                adamcameroncf Adam Cameron
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: