summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-27 12:45:29 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-27 12:45:29 +0000
commit62ad417517e92bf2612b65ef943b3005fd882fdf (patch)
treeeb100a96c349ee178bcad2e84612d4291f1fc879
parent02a8f15c9bc59946222a83de211a8daf373d928f (diff)
* string.c (rb_str_startwith): rename startwith? to start_with?,
endwith? to endwith?, respectively. [ruby-talk:216685] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--string.c12
2 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index d17e4ef888..783fb0c375 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Sep 27 21:21:08 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * string.c (rb_str_startwith): rename startwith? to start_with?,
+ endwith? to endwith?, respectively. [ruby-talk:216685]
+
Wed Sep 27 13:29:01 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/cgi.rb (CGI::TagMaker::nOE_element_def): replace to_s by
diff --git a/string.c b/string.c
index 9a45d2f5ce..e8468b0791 100644
--- a/string.c
+++ b/string.c
@@ -4512,13 +4512,13 @@ rb_str_rpartition(VALUE str, VALUE sep)
/*
* call-seq:
- * str.startwith?([prefix]+) => true or false
+ * str.start_with?([prefix]+) => true or false
*
* Returns true if <i>str</i> starts with the prefix given.
*/
static VALUE
-rb_str_startwith(int argc, VALUE *argv, VALUE str)
+rb_str_start_with(int argc, VALUE *argv, VALUE str)
{
int i;
@@ -4534,13 +4534,13 @@ rb_str_startwith(int argc, VALUE *argv, VALUE str)
/*
* call-seq:
- * str.endwith?([suffix]+) => true or false
+ * str.end_with?([suffix]+) => true or false
*
* Returns true if <i>str</i> ends with the suffix given.
*/
static VALUE
-rb_str_endwith(int argc, VALUE *argv, VALUE str)
+rb_str_end_with(int argc, VALUE *argv, VALUE str)
{
int i;
@@ -4899,8 +4899,8 @@ Init_String(void)
rb_define_method(rb_cString, "ord", rb_str_ord, 0);
rb_define_method(rb_cString, "include?", rb_str_include, 1);
- rb_define_method(rb_cString, "startwith?", rb_str_startwith, -1);
- rb_define_method(rb_cString, "endwith?", rb_str_endwith, -1);
+ rb_define_method(rb_cString, "start_with?", rb_str_start_with, -1);
+ rb_define_method(rb_cString, "end_with?", rb_str_end_with, -1);
rb_define_method(rb_cString, "scan", rb_str_scan, 1);