diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-03-03 11:07:36 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-03-03 15:27:37 +0900 |
commit | 680bd9027f8cb7977bbc216609db2f4e3cf199a8 (patch) | |
tree | 80354a5fea856f47a8bc2e1b82141a66dffd7e78 /re.c | |
parent | 103a65316c103253059ca4c49359dc7eb0043a4d (diff) |
[Bug #19471] `Regexp.compile` should handle keyword arguments
As well as `Regexp.new`, it should pass keyword arguments to the
`Regexp#initialize` method.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7431
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4688,7 +4688,7 @@ Init_Regexp(void) rb_cRegexp = rb_define_class("Regexp", rb_cObject); rb_define_alloc_func(rb_cRegexp, rb_reg_s_alloc); - rb_define_singleton_method(rb_cRegexp, "compile", rb_class_new_instance, -1); + rb_define_singleton_method(rb_cRegexp, "compile", rb_class_new_instance_pass_kw, -1); rb_define_singleton_method(rb_cRegexp, "quote", rb_reg_s_quote, 1); rb_define_singleton_method(rb_cRegexp, "escape", rb_reg_s_quote, 1); rb_define_singleton_method(rb_cRegexp, "union", rb_reg_s_union_m, -2); |