[Issue 7962] std.regex: Captures.length() returns incorrect value

2012-04-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7962


Dmitry Olshansky dmitry.o...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #4 from Dmitry Olshansky dmitry.o...@gmail.com 2012-04-23 
00:18:37 PDT ---
Does it need to be combined with another switch to enforce?

I think it's -w switch that stands for warnings as errors. Or -wi to just
enable them. Strange as I thought -property was independent entity.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 7962] std.regex: Captures.length() returns incorrect value

2012-04-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7962



--- Comment #3 from github-bugzi...@puremagic.com 2012-04-22 17:45:36 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/6c9414c8c9f1df9f2c42229cf1b7eb8bd90d076b
fix Issue 7962  Captures.length() returns incorrect value

https://github.com/D-Programming-Language/phobos/commit/70ad8e4aaeda91d8c1db19b07ac3e3c3db2d23a6
Merge pull request #548 from blackwhale/fix-captures

fix Issue 7962  Captures.length() returns incorrect value

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 7962] std.regex: Captures.length() returns incorrect value

2012-04-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7962


Dmitry Olshansky dmitry.o...@gmail.com changed:

   What|Removed |Added

   Keywords||pull
 CC||dmitry.o...@gmail.com


--- Comment #1 from Dmitry Olshansky dmitry.o...@gmail.com 2012-04-21 
14:11:59 PDT ---
(In reply to comment #0)
 It seems that Captures.length() from std.regex returns bogus lengths for empty
 captures (I might be using it improperly). Here's a simple example, the second
 match object claims length 2 while being empty.


Thanks for the detailed info. The problem is that Captures.length is hardwired
to the number of sub captures + 1 which is fine as long as there is a match.

For now you may use m.empty ? 0 : m.length as a workaround.

Pull:
https://github.com/D-Programming-Language/phobos/pull/548

P.S. Usage of e.g. length() is deprecated and fails with -property switch. Omit
parens for @property members.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---