Issue #13054 has been updated by Usaku NAKAMURA.
Backport changed from 2.1: UNKNOWN, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: UNKNOWN, 2.2: DONE, 2.3: REQUIRED
ruby_2_2 r57221 merged revision(s) 57123.
----------------------------------------
Bug #13054: MatchData segfaults if RMatch::regexp is nil
https://bugs.ruby-lang.org/issues/13054#change-62279
* Author: Kazuki Yamaguchi
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
* ruby -v:
* Backport: 2.1: UNKNOWN, 2.2: DONE, 2.3: REQUIRED
----------------------------------------
[Bug #10877] and [Bug #13042] didn't fix all of the issues.
The following four examples cause segfault for me:
~~~ruby
"abc".sub("a", ""); $~.hash
"abc".sub("a", ""); $~.names
"abc".sub("a", ""); $~.named_captures
"abc".sub("a", ""); m=$~; m.regexp; "abc".sub("a", ""); $~ == m
~~~
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>