[#78633] ruby/spec needs help from CRuby committers — Benoit Daloze <eregontp@...>

Currently, ruby/spec is maintained mostly by individuals and enjoys the

13 messages 2016/12/13

[ruby-core:78868] [Ruby trunk Bug#13042] gsub segfaults when the pattern is a matching string and the replacement has an unmatched named capture

From: usa@...
Date: 2016-12-27 10:55:35 UTC
List: ruby-core #78868
Issue #13042 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 r57218 merged revision(s) 57098.

----------------------------------------
Bug #13042: gsub segfaults when the pattern is a matching string and the replacement has an unmatched named capture
https://bugs.ruby-lang.org/issues/13042#change-62276

* Author: Hordur Freyr Yngvason
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]
* Backport: 2.1: UNKNOWN, 2.2: DONE, 2.3: REQUIRED
----------------------------------------
Ruby segfaults for all code of the form

~~~ ruby
string.gsub(pattern, replacement)
~~~

where `pattern` is a substring of `string` (not a regex) and `replacement` includes a "named capture", such as `\k<>`. For example:

~~~ ruby
'hello'.gsub('hello', '\k<oops>')
~~~

---Files--------------------------------
error (5.81 KB)
test.rb (34 Bytes)


-- 
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>

In This Thread

Prev Next