* [ruby-dev:47471] [ruby-trunk - Bug #8583][Open] A problem of condition regexp with a named capture
@ 2013-06-30 7:35 ohai (Ippei Obayashi)
2013-07-01 2:33 ` [ruby-dev:47474] [ruby-trunk - Bug #8583] " nagachika (Tomoyuki Chikanaga)
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: ohai (Ippei Obayashi) @ 2013-06-30 7:35 UTC (permalink / raw
To: ruby developers list
Issue #8583 has been reported by ohai (Ippei Obayashi).
----------------------------------------
Bug #8583: A problem of condition regexp with a named capture
https://bugs.ruby-lang.org/issues/8583
Author: ohai (Ippei Obayashi)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: current: 2.1.0
ruby -v: ruby 2.1.0dev (2013-06-30 trunk 41711) [x86_64-linux]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN
以下の条件分岐を含む正規表現は "xy" "yx" にマッチし、"xx" "yy" にはマッチしません。
/\A((x)|(y))(?(2)y|x)\z/
名前付きキャプチャを用いた以下の正規表現も同じ挙動をするはずですが、そうはなっていません。
/\A((?<x>x)|(?<y>y))(?(<x>)y|x)\z/
# "xx" "yy" にマッチして "xy" "yx" にはマッチしない。
2.0.0-p247, trunk の両方で確認しました。
この問題について調べた所、 名前付きキャプチャを使うときキャプチャの番号をrenumberしている
所で renumber がもれています。
添付したパッチのように修正すれば直ると思います。
--
http://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ruby-dev:47474] [ruby-trunk - Bug #8583] A problem of condition regexp with a named capture
2013-06-30 7:35 [ruby-dev:47471] [ruby-trunk - Bug #8583][Open] A problem of condition regexp with a named capture ohai (Ippei Obayashi)
@ 2013-07-01 2:33 ` nagachika (Tomoyuki Chikanaga)
2013-07-01 4:34 ` [ruby-dev:47475] " usa (Usaku NAKAMURA)
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: nagachika (Tomoyuki Chikanaga) @ 2013-07-01 2:33 UTC (permalink / raw
To: ruby developers list
Issue #8583 has been updated by nagachika (Tomoyuki Chikanaga).
Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN to 1.9.3: UNKNOWN, 2.0.0: REQUIRED
----------------------------------------
Bug #8583: A problem of condition regexp with a named capture
https://bugs.ruby-lang.org/issues/8583#change-40217
Author: ohai (Ippei Obayashi)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: current: 2.1.0
ruby -v: ruby 2.1.0dev (2013-06-30 trunk 41711) [x86_64-linux]
Backport: 1.9.3: UNKNOWN, 2.0.0: REQUIRED
以下の条件分岐を含む正規表現は "xy" "yx" にマッチし、"xx" "yy" にはマッチしません。
/\A((x)|(y))(?(2)y|x)\z/
名前付きキャプチャを用いた以下の正規表現も同じ挙動をするはずですが、そうはなっていません。
/\A((?<x>x)|(?<y>y))(?(<x>)y|x)\z/
# "xx" "yy" にマッチして "xy" "yx" にはマッチしない。
2.0.0-p247, trunk の両方で確認しました。
この問題について調べた所、 名前付きキャプチャを使うときキャプチャの番号をrenumberしている
所で renumber がもれています。
添付したパッチのように修正すれば直ると思います。
--
http://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ruby-dev:47475] [ruby-trunk - Bug #8583] A problem of condition regexp with a named capture
2013-06-30 7:35 [ruby-dev:47471] [ruby-trunk - Bug #8583][Open] A problem of condition regexp with a named capture ohai (Ippei Obayashi)
2013-07-01 2:33 ` [ruby-dev:47474] [ruby-trunk - Bug #8583] " nagachika (Tomoyuki Chikanaga)
@ 2013-07-01 4:34 ` usa (Usaku NAKAMURA)
2013-07-02 6:25 ` [ruby-dev:47479] " knu (Akinori MUSHA)
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: usa (Usaku NAKAMURA) @ 2013-07-01 4:34 UTC (permalink / raw
To: ruby developers list
Issue #8583 has been updated by usa (Usaku NAKAMURA).
Backport changed from 1.9.3: UNKNOWN, 2.0.0: REQUIRED to 1.9.3: DONTNEED, 2.0.0: REQUIRED
----------------------------------------
Bug #8583: A problem of condition regexp with a named capture
https://bugs.ruby-lang.org/issues/8583#change-40221
Author: ohai (Ippei Obayashi)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: current: 2.1.0
ruby -v: ruby 2.1.0dev (2013-06-30 trunk 41711) [x86_64-linux]
Backport: 1.9.3: DONTNEED, 2.0.0: REQUIRED
以下の条件分岐を含む正規表現は "xy" "yx" にマッチし、"xx" "yy" にはマッチしません。
/\A((x)|(y))(?(2)y|x)\z/
名前付きキャプチャを用いた以下の正規表現も同じ挙動をするはずですが、そうはなっていません。
/\A((?<x>x)|(?<y>y))(?(<x>)y|x)\z/
# "xx" "yy" にマッチして "xy" "yx" にはマッチしない。
2.0.0-p247, trunk の両方で確認しました。
この問題について調べた所、 名前付きキャプチャを使うときキャプチャの番号をrenumberしている
所で renumber がもれています。
添付したパッチのように修正すれば直ると思います。
--
http://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ruby-dev:47479] [ruby-trunk - Bug #8583] A problem of condition regexp with a named capture
2013-06-30 7:35 [ruby-dev:47471] [ruby-trunk - Bug #8583][Open] A problem of condition regexp with a named capture ohai (Ippei Obayashi)
2013-07-01 2:33 ` [ruby-dev:47474] [ruby-trunk - Bug #8583] " nagachika (Tomoyuki Chikanaga)
2013-07-01 4:34 ` [ruby-dev:47475] " usa (Usaku NAKAMURA)
@ 2013-07-02 6:25 ` knu (Akinori MUSHA)
2013-07-04 0:30 ` [ruby-dev:47480] " knu (Akinori MUSHA)
2013-07-04 15:51 ` [ruby-dev:47481] [Backport 200 - Backport #8583][Assigned] " nagachika (Tomoyuki Chikanaga)
4 siblings, 0 replies; 6+ messages in thread
From: knu (Akinori MUSHA) @ 2013-07-02 6:25 UTC (permalink / raw
To: ruby developers list
Issue #8583 has been updated by knu (Akinori MUSHA).
Thank you. I've just reported this to the upstream with the given test cases: https://github.com/k-takata/Onigmo/pull/20
----------------------------------------
Bug #8583: A problem of condition regexp with a named capture
https://bugs.ruby-lang.org/issues/8583#change-40253
Author: ohai (Ippei Obayashi)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: current: 2.1.0
ruby -v: ruby 2.1.0dev (2013-06-30 trunk 41711) [x86_64-linux]
Backport: 1.9.3: DONTNEED, 2.0.0: REQUIRED
以下の条件分岐を含む正規表現は "xy" "yx" にマッチし、"xx" "yy" にはマッチしません。
/\A((x)|(y))(?(2)y|x)\z/
名前付きキャプチャを用いた以下の正規表現も同じ挙動をするはずですが、そうはなっていません。
/\A((?<x>x)|(?<y>y))(?(<x>)y|x)\z/
# "xx" "yy" にマッチして "xy" "yx" にはマッチしない。
2.0.0-p247, trunk の両方で確認しました。
この問題について調べた所、 名前付きキャプチャを使うときキャプチャの番号をrenumberしている
所で renumber がもれています。
添付したパッチのように修正すれば直ると思います。
--
http://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ruby-dev:47480] [ruby-trunk - Bug #8583] A problem of condition regexp with a named capture
2013-06-30 7:35 [ruby-dev:47471] [ruby-trunk - Bug #8583][Open] A problem of condition regexp with a named capture ohai (Ippei Obayashi)
` (2 preceding siblings ...)
2013-07-02 6:25 ` [ruby-dev:47479] " knu (Akinori MUSHA)
@ 2013-07-04 0:30 ` knu (Akinori MUSHA)
2013-07-04 15:51 ` [ruby-dev:47481] [Backport 200 - Backport #8583][Assigned] " nagachika (Tomoyuki Chikanaga)
4 siblings, 0 replies; 6+ messages in thread
From: knu (Akinori MUSHA) @ 2013-07-04 0:30 UTC (permalink / raw
To: ruby developers list
Issue #8583 has been updated by knu (Akinori MUSHA).
Onigmo 5.13.5 has been released, which includes the fix.
----------------------------------------
Bug #8583: A problem of condition regexp with a named capture
https://bugs.ruby-lang.org/issues/8583#change-40284
Author: ohai (Ippei Obayashi)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: current: 2.1.0
ruby -v: ruby 2.1.0dev (2013-06-30 trunk 41711) [x86_64-linux]
Backport: 1.9.3: DONTNEED, 2.0.0: REQUIRED
以下の条件分岐を含む正規表現は "xy" "yx" にマッチし、"xx" "yy" にはマッチしません。
/\A((x)|(y))(?(2)y|x)\z/
名前付きキャプチャを用いた以下の正規表現も同じ挙動をするはずですが、そうはなっていません。
/\A((?<x>x)|(?<y>y))(?(<x>)y|x)\z/
# "xx" "yy" にマッチして "xy" "yx" にはマッチしない。
2.0.0-p247, trunk の両方で確認しました。
この問題について調べた所、 名前付きキャプチャを使うときキャプチャの番号をrenumberしている
所で renumber がもれています。
添付したパッチのように修正すれば直ると思います。
--
http://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ruby-dev:47481] [Backport 200 - Backport #8583][Assigned] A problem of condition regexp with a named capture
2013-06-30 7:35 [ruby-dev:47471] [ruby-trunk - Bug #8583][Open] A problem of condition regexp with a named capture ohai (Ippei Obayashi)
` (3 preceding siblings ...)
2013-07-04 0:30 ` [ruby-dev:47480] " knu (Akinori MUSHA)
@ 2013-07-04 15:51 ` nagachika (Tomoyuki Chikanaga)
4 siblings, 0 replies; 6+ messages in thread
From: nagachika (Tomoyuki Chikanaga) @ 2013-07-04 15:51 UTC (permalink / raw
To: ruby developers list
Issue #8583 has been updated by nagachika (Tomoyuki Chikanaga).
Status changed from Open to Assigned
Assignee set to nagachika (Tomoyuki Chikanaga)
----------------------------------------
Backport #8583: A problem of condition regexp with a named capture
https://bugs.ruby-lang.org/issues/8583#change-40293
Author: ohai (Ippei Obayashi)
Status: Assigned
Priority: Normal
Assignee: nagachika (Tomoyuki Chikanaga)
Category:
Target version:
以下の条件分岐を含む正規表現は "xy" "yx" にマッチし、"xx" "yy" にはマッチしません。
/\A((x)|(y))(?(2)y|x)\z/
名前付きキャプチャを用いた以下の正規表現も同じ挙動をするはずですが、そうはなっていません。
/\A((?<x>x)|(?<y>y))(?(<x>)y|x)\z/
# "xx" "yy" にマッチして "xy" "yx" にはマッチしない。
2.0.0-p247, trunk の両方で確認しました。
この問題について調べた所、 名前付きキャプチャを使うときキャプチャの番号をrenumberしている
所で renumber がもれています。
添付したパッチのように修正すれば直ると思います。
--
http://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-07-04 16:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-30 7:35 [ruby-dev:47471] [ruby-trunk - Bug #8583][Open] A problem of condition regexp with a named capture ohai (Ippei Obayashi)
2013-07-01 2:33 ` [ruby-dev:47474] [ruby-trunk - Bug #8583] " nagachika (Tomoyuki Chikanaga)
2013-07-01 4:34 ` [ruby-dev:47475] " usa (Usaku NAKAMURA)
2013-07-02 6:25 ` [ruby-dev:47479] " knu (Akinori MUSHA)
2013-07-04 0:30 ` [ruby-dev:47480] " knu (Akinori MUSHA)
2013-07-04 15:51 ` [ruby-dev:47481] [Backport 200 - Backport #8583][Assigned] " nagachika (Tomoyuki Chikanaga)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).