Skip to content
Tcl Source Code History Of Ticket c0bc269178df9389
Login

History Of Ticket c0bc269178df9389

Artifacts Associated With Ticket c0bc269178df9389

  1. Ticket change [ab139a23a5] (rid 204483) by apnadkarni on 2022-09-20 18:40:42:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. comment initialized to:
      The third element of m below should be the empty string as the (b)? is not
      matched.
      
      ```
      % switch -regexp -matchvar m -indexvar i ac {
      {(a)(b)?(c)} {puts m:$m; puts i:$i}
      }
      m:ac a ac c
      i:{0 1} {0 0} {-1 -1} {1 1}
      % info patch
      8.7a6
      ```
      
      core-8-6-branch also exhibits this bug.
      
      **However, 8.6.12 shows correct behavior**
      
      ```
      D:\src\ruff\doc\nroff>d:\tcl\magic\bin\tclsh.exe
      % switch -regexp -matchvar m -indexvar i ac {
      {(a)(b)?(c)} {puts m:$m; puts i:$i}
      }
      m:ac a {} c
      i:{0 1} {0 0} {-1 -1} {1 1}
      % info patch
      8.6.12
      ```
      
      So clearly something was broken post-8.6.12 release.
      
    5. foundin initialized to: "8.7"
    6. is_private initialized to: "0"
    7. login: "apnadkarni"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "apnadkarni"
    13. subsystem initialized to: "- New Builtin Commands"
    14. title initialized to:
      switch -regexp -matchvar -indexvar broken when optional subexpression does not match
      
    15. type initialized to: "Bug"
  2. Ticket change [81fe00d01d] (rid 204484) by apnadkarni on 2022-09-20 18:50:44:

    1. foundin changed to: "8.6.13"
    2. icomment:
      The bug seems to have been introduced with [this](https://core.tcl-lang.org/tcl/info/26539e78a71993cc) checkin on this [line](https://core.tcl-lang.org/tcl/file?ci=94f71d598512687b&name=generic/tclStringObj.c&ln=823).
      
      However, it seems a deliberate change so not clear to me that just reverting is the correct fix.
      
      /Ashok
      
    3. login: "apnadkarni"
    4. mimetype: "text/x-markdown"
    5. priority changed to: "7 High"
    6. subsystem changed to: "18. Commands M-Z"
  3. Ticket change [5603d59098] (rid 204485) by dgp on 2022-09-20 19:06:49:

    1. icomment:
      
      How did Tcl behave in release 8.6.10 ?
      
      See TIP 623 for more background.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  4. Ticket change [45afa2d005] (rid 204491) by jan.nijtmans on 2022-09-20 20:44:39:

    1. assignee changed to: "jan.nijtmans"
    2. icomment:
      Proposed fix [ea165f0333f93885|here]
      
      Thanks for the report, and for the testcase!
      
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"
    5. resolution changed to: "Fixed"
    6. status changed to: "Pending"
  5. Ticket change [a9ddb08836] (rid 204518) by jan.nijtmans on 2022-09-21 13:15:16:

    1. closedate changed to: "2459844.05227431"
    2. closer changed to: "jan.nijtmans"
    3. icomment: "Fix committed [92ab43ecd6cdd9a4|here]"
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
    6. status changed to: "Closed"