[ruby-core:127294] [Ruby Bug#22492] String#rindex misses a match with a leading .* in multiline mode
Issue #22492 has been reported by mame (Yusuke Endoh). ---------------------------------------- Bug #22492: String#rindex misses a match with a leading .* in multiline mode https://bugs.ruby-lang.org/issues/22492 * Author: mame (Yusuke Endoh) * Status: Open * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- `String#rindex` with a regexp starting with `.*` in multiline mode returns `nil` even when there is a match. ```ruby "xab".rindex(/.*b/m) #=> nil (expected: 2) "xab".rindex(/.*b/) #=> 2 ``` @make_now_just found this and wrote the fix. -- https://bugs.ruby-lang.org/
Issue #22492 has been updated by mame (Yusuke Endoh). https://github.com/ruby/ruby/pull/19643 ---------------------------------------- Bug #22492: String#rindex misses a match with a leading .* in multiline mode https://bugs.ruby-lang.org/issues/22492#change-119720 * Author: mame (Yusuke Endoh) * Status: Open * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- `String#rindex` with a regexp starting with `.*` in multiline mode returns `nil` even when there is a match. ```ruby "xab".rindex(/.*b/m) #=> nil (expected: 2) "xab".rindex(/.*b/) #=> 2 ``` @make_now_just found this and wrote the fix. -- https://bugs.ruby-lang.org/
Issue #22492 has been updated by k0kubun (Takashi Kokubun). Backport changed from 3.3: REQUIRED, 3.4: REQUIRED, 4.0: REQUIRED to 3.3: REQUIRED, 3.4: REQUIRED, 4.0: DONE ruby_4_0 commit:6e7a8c5dc91794681d1da4a2e9d71aebf114d955 merged revision(s) commit:d55b67dfa3c1f94a4855381b400da7aa987bb5be. ---------------------------------------- Bug #22492: String#rindex misses a match with a leading .* in multiline mode https://bugs.ruby-lang.org/issues/22492#change-119982 * Author: mame (Yusuke Endoh) * Status: Closed * Backport: 3.3: REQUIRED, 3.4: REQUIRED, 4.0: DONE ---------------------------------------- `String#rindex` with a regexp starting with `.*` in multiline mode returns `nil` even when there is a match. ```ruby "xab".rindex(/.*b/m) #=> nil (expected: 2) "xab".rindex(/.*b/) #=> 2 ``` @make_now_just found this and wrote the fix. -- https://bugs.ruby-lang.org/
Issue #22492 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.3: REQUIRED, 3.4: REQUIRED, 4.0: DONE to 3.3: REQUIRED, 3.4: DONE, 4.0: DONE ruby_3_4 commit:91fd5aba65f375eb301e33ae257ba1cd45813513 merged revision(s) commit:d55b67dfa3c1f94a4855381b400da7aa987bb5be. ---------------------------------------- Bug #22492: String#rindex misses a match with a leading .* in multiline mode https://bugs.ruby-lang.org/issues/22492#change-120034 * Author: mame (Yusuke Endoh) * Status: Closed * Backport: 3.3: REQUIRED, 3.4: DONE, 4.0: DONE ---------------------------------------- `String#rindex` with a regexp starting with `.*` in multiline mode returns `nil` even when there is a match. ```ruby "xab".rindex(/.*b/m) #=> nil (expected: 2) "xab".rindex(/.*b/) #=> 2 ``` @make_now_just found this and wrote the fix. -- https://bugs.ruby-lang.org/
participants (3)
-
k0kubun (Takashi Kokubun) -
mame (Yusuke Endoh) -
nagachika (Tomoyuki Chikanaga)