summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-09-05 06:54:57 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-09-05 06:54:57 +0000
commit2e2786ccab636dd82de640bd771f2cc9fc20ab31 (patch)
tree0fc0c7632c71d722058b1f6c7ca513d57611086d /re.c
parent393f665e33782d4a91813abe599b1b28d675127d (diff)
* re.c (Init_Regexp): to_s to be alias to inspect.
* parse.y (yylex): should support 'keyword='. * ruby.c (proc_options): should not adjust argc/argv if -e option is supplied. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/re.c b/re.c
index 877ad4c..7e57b85 100644
--- a/re.c
+++ b/re.c
@@ -1397,6 +1397,7 @@ Init_Regexp()
rb_define_method(rb_cRegexp, "===", rb_reg_match, 1);
rb_define_method(rb_cRegexp, "~", rb_reg_match2, 0);
rb_define_method(rb_cRegexp, "match", rb_reg_match_m, 1);
+ rb_define_method(rb_cRegexp, "to_s", rb_reg_inspect, 0);
rb_define_method(rb_cRegexp, "inspect", rb_reg_inspect, 0);
rb_define_method(rb_cRegexp, "source", rb_reg_source, 0);
rb_define_method(rb_cRegexp, "casefold?", rb_reg_casefold_p, 0);
@@ -1425,6 +1426,6 @@ Init_Regexp()
rb_define_method(rb_cMatch, "pre_match", rb_reg_match_pre, 0);
rb_define_method(rb_cMatch, "post_match", rb_reg_match_post, 0);
rb_define_method(rb_cMatch, "to_s", match_to_s, 0);
- rb_define_method(rb_cMatch, "string", match_string, 0);
rb_define_method(rb_cMatch, "inspect", rb_any_to_s, 0);
+ rb_define_method(rb_cMatch, "string", match_string, 0);
}