[#86520] [Ruby trunk Bug#14681] `syswrite': stream closed in another thread (IOError) — samuel@...
Issue #14681 has been reported by ioquatix (Samuel Williams).
3 messages
2018/04/12
[#86755] [Ruby trunk Feature#14723] [WIP] sleepy GC — normalperson@...
Issue #14723 has been reported by normalperson (Eric Wong).
6 messages
2018/04/29
[ruby-core:86478] [Ruby trunk Feature#14669] Regexp does not expose the amount of capture groups.
From:
eregontp@...
Date:
2018-04-08 11:11:06 UTC
List:
ruby-core #86478
Issue #14669 has been updated by Eregon (Benoit Daloze).
This information is available for named captures via Regexp#names and Regexp#named_captures, but it doesn't seem available for unnamed capture groups:
~~~ruby
[15] pry(main)> /(?<one>a)(?<two>b)(?<three>c)/.named_captures
=> {"one"=>[1], "two"=>[2], "three"=>[3]}
[16] pry(main)> /(a)(b)(c)/.named_captures
=> {}
[17] pry(main)> /(?<one>a)(?<two>b)(?<three>c)/.names
=> ["one", "two", "three"]
[18] pry(main)> /(a)(b)(c)/.names
=> []
~~~
----------------------------------------
Feature #14669: Regexp does not expose the amount of capture groups.
https://bugs.ruby-lang.org/issues/14669#change-71417
* Author: xfbs (Patrick Elsen)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
For a project we needed to know how many capture groups a Regex exposes (before actually matching it). The Onigmo regex library used by Ruby has this information, accessible with *onig_number_of_captures(const regex_t \*)*, but the Ruby Regexp class doesn't expose this information.
--
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>