From a47f598d77ac97f9fe89fe16aa8bcab4fd262c16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lourens=20Naud=C3=A9?= Date: Sat, 20 Apr 2019 00:44:51 +0100 Subject: Reduce ONIG_NREGION from 10 to 4: power of 2 and testing revealed most pattern matches are less than or equal to 4 results Closes: https://github.com/ruby/ruby/pull/2135 --- include/ruby/onigmo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/ruby') diff --git a/include/ruby/onigmo.h b/include/ruby/onigmo.h index 34b8268d59..6187b37dc3 100644 --- a/include/ruby/onigmo.h +++ b/include/ruby/onigmo.h @@ -434,7 +434,7 @@ int onigenc_str_bytelen_null(OnigEncoding enc, const OnigUChar* p); /* PART: regular expression */ /* config parameters */ -#define ONIG_NREGION 10 +#define ONIG_NREGION 4 #define ONIG_MAX_CAPTURE_GROUP_NUM 32767 #define ONIG_MAX_BACKREF_NUM 1000 #define ONIG_MAX_REPEAT_NUM 100000 -- cgit v1.2.3