bugGNU Octave - Bugs: bug #39010, strsplit returns incorrect result...

 
 

bug #39010: strsplit returns incorrect result if target string contains only delimiters

Submitter:  John W. Eaton <jwe>
Submitted:  Thu 16 May 2013 07:04:59 PM UTC
   
 
Category:  Octave Function Severity:  5 - Blocker
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  bpabbott
Originator Name:  jwe Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 22 Jun 2013 03:28:34 AM UTC, comment #4: 

There have been no reports of problems, so I'm setting the status to "Fixed" and closing this report.

Ben Abbott <bpabbott>
Group Member
Thu 06 Jun 2013 03:25:15 AM UTC, comment #3: 

I've pushed a few changesets which should resolve this bug.

Re-introduce the original strsplit() as ostrsplit().
http://hg.savannah.gnu.org/hgweb/octave/rev/45b57ac44854

Replace strsplit() with ostrsplit() in Octave's sources.
http://hg.savannah.gnu.org/hgweb/octave/rev/b7667fcb9fbc

Add ostrsplit() to the manual.
http://hg.savannah.gnu.org/hgweb/octave/rev/57bf164f1608

Mention ostrsplit() in NEWS
http://hg.savannah.gnu.org/hgweb/octave/rev/694883adb279

Remove legacy support from strsplit()
http://hg.savannah.gnu.org/hgweb/octave/rev/3ce3579405f8

Ben Abbott <bpabbott>
Group Member
Fri 17 May 2013 12:44:18 PM UTC, comment #2: 

I just noticed I can export the entire patch via "outgoing -p".  It is attached.

(file #28100)

Ben Abbott <bpabbott>
Group Member
Fri 17 May 2013 11:53:54 AM UTC, comment #1: 

I had decided that the proper thing to do was to back out the changes to strsplit and start over by renaming the original and then introducing a new function.

I did the following.


hg update -C default
hg backout -r 61989cde13ae -m "Backout 61989cde13ae" --merge
hg commit -m "Merge the backout of 61989cde13ae"
hg backout -r 5be43435bd5b -m "Backout 5be43435bd5b" --merge
hg commit -m "Merge the backout of 5be43435bd5b"
hg backout -r 1de4ec2a856d -m "Backout 1de4ec2a856d" --merge
hg commit -m "Merge the backout of 1de4ec2a856d"


During which I had some merge problems.  I think I've got it worked out, but am in unfamiliar territory, so I'm a bit nervous.

I check the number of "heads"


$ hg heads
changeset:   16678:88fffa5261c9
tag:         tip
parent:      16676:1237c65c0b1f
parent:      16677:0f46a5397b72
user:        Ben Abbott  <bpabbott@mac.com>
date:        Fri May 17 19:28:54 2013 +0800
summary:     Merge the backout of 1de4ec2a856d

changeset:   16645:450c03932d6c
branch:      classdef
user:        John W. Eaton <jwe@octave.org>
date:        Sun May 12 21:47:57 2013 -0400
summary:     don't push superclass and metaclass tokens twice

changeset:   16600:f2f5dd09e97d
branch:      stable
user:        Jordi GutiĆ©rrez Hermoso <jordigh@octave.org>
date:        Wed May 01 14:41:50 2013 -0400
summary:     doc: fix some minor sparse documentation oversights


And the outgoing says,


$ hg outgoing
comparing with /Users/bpabbott/Development/mercurial/octave
searching for changes
changeset:   16673:c9eebb0281c8
parent:      16412:61989cde13ae
user:        Ben Abbott  <bpabbott@mac.com>
date:        Fri May 17 18:57:28 2013 +0800
summary:     Backout 61989cde13ae

changeset:   16674:e7687c90c1d8
parent:      16672:fd43631f09c2
parent:      16673:c9eebb0281c8
user:        Ben Abbott  <bpabbott@mac.com>
date:        Fri May 17 18:57:35 2013 +0800
summary:     Merge the backout of 61989cde13ae

changeset:   16675:3ab2e6b4dc6b
parent:      16411:5be43435bd5b
user:        Ben Abbott  <bpabbott@mac.com>
date:        Fri May 17 18:57:44 2013 +0800
summary:     Backout 5be43435bd5b

changeset:   16676:1237c65c0b1f
parent:      16674:e7687c90c1d8
parent:      16675:3ab2e6b4dc6b
user:        Ben Abbott  <bpabbott@mac.com>
date:        Fri May 17 19:27:47 2013 +0800
summary:     Merge the backout of 5be43435bd5b

changeset:   16677:0f46a5397b72
parent:      16403:1de4ec2a856d
user:        Ben Abbott  <bpabbott@mac.com>
date:        Fri May 17 19:28:04 2013 +0800
summary:     Backout 1de4ec2a856d

changeset:   16678:88fffa5261c9
tag:         tip
parent:      16676:1237c65c0b1f
parent:      16677:0f46a5397b72
user:        Ben Abbott  <bpabbott@mac.com>
date:        Fri May 17 19:28:54 2013 +0800
summary:     Merge the backout of 1de4ec2a856d


If all looks good, I can push this change.

Ben Abbott <bpabbott>
Group Member
Thu 16 May 2013 07:04:59 PM UTC, original submission:  

The following call to strsplit should return a cell array containing two empty character strings but it currently returns an empty cell array.


strsplit ('::', ':')


I tagged this as a blocker so that it won't be forgotten before the next release.

John W. Eaton <jwe>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #28100:  strsplit-backout.patch added by bpabbott (59KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by jwe (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-06-22 bpabbott StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2013-06-06 bpabbott StatusIn Progress Ready For Test
    2013-05-17 bpabbott Attached File- Added strsplit-backout.patch, #28100

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code