diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-20 20:38:57 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-20 20:38:57 +0000 |
commit | 6204e0804b24f1675b49d5880da014411bcfb831 (patch) | |
tree | ce6c00bf078fc416936ca3cdc972b9b3c1c78dae /spec/ruby/optional/capi/ext/regexp_spec.c | |
parent | 58573c33e4720315ed27491e31dcc22892e1ce95 (diff) |
Update to ruby/spec@35a9fba
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/optional/capi/ext/regexp_spec.c')
-rw-r--r-- | spec/ruby/optional/capi/ext/regexp_spec.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/spec/ruby/optional/capi/ext/regexp_spec.c b/spec/ruby/optional/capi/ext/regexp_spec.c index 1058293444..fc1c8b1e63 100644 --- a/spec/ruby/optional/capi/ext/regexp_spec.c +++ b/spec/ruby/optional/capi/ext/regexp_spec.c @@ -9,41 +9,29 @@ extern "C" { #endif -#ifdef HAVE_RB_REG_NEW VALUE regexp_spec_re(VALUE self) { return rb_reg_new("a", 1, 0); } -#endif -#ifdef HAVE_RB_REG_NTH_MATCH VALUE regexp_spec_reg_1st_match(VALUE self, VALUE md) { return rb_reg_nth_match(1, md); } -#endif -#ifdef HAVE_RB_REG_OPTIONS VALUE regexp_spec_rb_reg_options(VALUE self, VALUE regexp) { return INT2FIX(rb_reg_options(regexp)); } -#endif -#ifdef HAVE_RB_REG_REGCOMP VALUE regexp_spec_rb_reg_regcomp(VALUE self, VALUE str) { return rb_reg_regcomp(str); } -#endif -#ifdef HAVE_RB_REG_MATCH VALUE regexp_spec_reg_match(VALUE self, VALUE re, VALUE str) { return rb_reg_match(re, str); } -#endif -#ifdef HAVE_RB_BACKREF_GET VALUE regexp_spec_backref_get(VALUE self) { return rb_backref_get(); } -#endif VALUE regexp_spec_match(VALUE self, VALUE regexp, VALUE str) { return rb_funcall(regexp, rb_intern("match"), 1, str); @@ -51,32 +39,13 @@ VALUE regexp_spec_match(VALUE self, VALUE regexp, VALUE str) { void Init_regexp_spec(void) { VALUE cls = rb_define_class("CApiRegexpSpecs", rb_cObject); - rb_define_method(cls, "match", regexp_spec_match, 2); - -#ifdef HAVE_RB_REG_NEW rb_define_method(cls, "a_re", regexp_spec_re, 0); -#endif - -#ifdef HAVE_RB_REG_NTH_MATCH rb_define_method(cls, "a_re_1st_match", regexp_spec_reg_1st_match, 1); -#endif - -#ifdef HAVE_RB_REG_MATCH rb_define_method(cls, "rb_reg_match", regexp_spec_reg_match, 2); -#endif - -#ifdef HAVE_RB_BACKREF_GET rb_define_method(cls, "rb_backref_get", regexp_spec_backref_get, 0); -#endif - -#ifdef HAVE_RB_REG_OPTIONS rb_define_method(cls, "rb_reg_options", regexp_spec_rb_reg_options, 1); -#endif - -#ifdef HAVE_RB_REG_REGCOMP rb_define_method(cls, "rb_reg_regcomp", regexp_spec_rb_reg_regcomp, 1); -#endif } #ifdef __cplusplus |