Issue #8076 has been updated by k_takata (Ken Takata).


??????????????????????????????足???????????????????????????????????
https://github.com/k-takata/Onigmo/commit/962464a4dd4a9342febfd3e139d51d4282395b28
??? regcomp.c ??対?????????????????????????????????????
??????????????????????? regexec.c ??対??????修正???? #3568 ??修正?????????????????????????度???????????????????????????????1.9.3??????????????????????????
----------------------------------------
Backport #8076: Lookbehind assertion fails with /m mode enabled
https://bugs.ruby-lang.org/issues/8076#change-37523

Author: naruse (Yui NARUSE)
Status: Assigned
Priority: Normal
Assignee: usa (Usaku NAKAMURA)
Category: 
Target version: 


Lookbehind assertions fail if they are longer than one character, and if dotall mode is set.

irb(main):001:0> "foo" =~ /(?<=f).*/m
=> 1
irb(main):002:0> "foo" =~ /(?<=fo).*/m
=> nil

The latter should have matched the "o". This only seems to happen with dotall mode turned on (dot matches newline); without it, everything is OK:

irb(main):003:0> "foo" =~ /(?<=f).*/
=> 1
irb(main):004:0> "foo" =~ /(?<=fo).*/
=> 2


-- 
http://bugs.ruby-lang.org/