Note about Regexp.linera_time? [ci skip]
This commit is contained in:
parent
e123695fbc
commit
47a6e7b518
10
re.c
10
re.c
@ -4204,6 +4204,16 @@ rb_reg_s_union_m(VALUE self, VALUE args)
|
|||||||
*
|
*
|
||||||
* Regexp.linear_time?(/re/) # => true
|
* Regexp.linear_time?(/re/) # => true
|
||||||
*
|
*
|
||||||
|
* Note that this is a property of the ruby interpreter, not of the argument
|
||||||
|
* regular expression. Identical regexp can or cannot run in linear time
|
||||||
|
* depending on your ruby binary. Neither forward nor backward compatibility
|
||||||
|
* is guaranteed about the return value of this method. Our current algorithm
|
||||||
|
* is (*1) but this is subject to change in the future. Alternative
|
||||||
|
* implementations can also behave differently. They might always return
|
||||||
|
* false of everything.
|
||||||
|
*
|
||||||
|
* (*1): https://doi.org/10.1109/SP40001.2021.00032
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_reg_s_linear_time_p(int argc, VALUE *argv, VALUE self)
|
rb_reg_s_linear_time_p(int argc, VALUE *argv, VALUE self)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user