summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-06-20 13:35:21 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-06-20 19:35:12 +0900
commit4a6facc2d683d1dbb67ded8a9f4d7cd10a9fd8ad (patch)
tree61442bcd86525d70af1da765043b2c9fbf5ff5ed /re.c
parent883d13dc4127b5fde617b584ebb89714eac19965 (diff)
downloadruby-4a6facc2d683d1dbb67ded8a9f4d7cd10a9fd8ad.tar.gz
[Feature #18788] [DOC] String options to `Regexp.new`
Co-Authored-By: Janosch Mùˆller <janosch.mueller@betterplace.org>
Diffstat (limited to 're.c')
-rw-r--r--re.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/re.c b/re.c
index 39d4fc046f..3e059b6287 100644
--- a/re.c
+++ b/re.c
@@ -3665,6 +3665,11 @@ str_to_option(VALUE str)
*
* Optional argument +options+ is one of the following:
*
+ * - A String of options:
+ *
+ * Regexp.new('foo', 'i') # => /foo/i
+ * Regexp.new('foo', 'im') # => /foo/im
+ *
* - The logical OR of one or more of the constants
* Regexp::EXTENDED, Regexp::IGNORECASE, and Regexp::MULTILINE:
*