Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-305

single character strings should be coerced to characters if it helps

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-5
    • 1.0-beta-10
    • None
    • None

    Description

      "sam".replace('s', 'j')

      =>

      Exception in thread "main" groovy.lang.MissingMethodException: No such method: replace for class: java.lang.String with arguments: [s, j]
      at groovy.lang.MetaClass.invokeMethod(MetaClass.java:271)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:130)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:103)
      at replacetest.run(replacetest.groovy)

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            spullara Sam Pullara
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: