aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-30 12:15:41 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-30 12:15:41 +0000
commit1c8ee8f85021fe322b7408bccdc41426203a0cce (patch)
tree2c2dfeeec8307f576e2e815655bc9e1688a964db
parent98611eb1d2e0b2ae186c0234b479c1d85f0a0ec5 (diff)
downloadruby-1c8ee8f85021fe322b7408bccdc41426203a0cce.tar.gz
* string.c: Document current behavior for other case mapping methods
on String. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--string.c45
2 files changed, 34 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 1b5d012078..da3cfb3310 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon May 30 21:15:37 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
+
+ * string.c: Document current behavior for other case mapping methods
+ on String. [ci skip]
+
Mon May 30 20:00:25 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
* string.c: Document current situation for String#downcase. [ci skip]
diff --git a/string.c b/string.c
index 24bcbeecfd..1fe74290c7 100644
--- a/string.c
+++ b/string.c
@@ -5827,11 +5827,13 @@ rb_str_casemap(VALUE source, OnigCaseFoldType *flags, rb_encoding *enc)
/*
* call-seq:
- * str.upcase! -> str or nil
+ * str.upcase! -> str or nil
+ * str.upcase!([options]) -> str or nil
*
* Upcases the contents of <i>str</i>, returning <code>nil</code> if no changes
* were made.
- * Note: case replacement is effective only in ASCII region.
+ *
+ * See String#downcase for meaning of +options+ and use with different encodings.
*/
static VALUE
@@ -5895,12 +5897,13 @@ rb_str_upcase_bang(int argc, VALUE *argv, VALUE str)
/*
* call-seq:
- * str.upcase -> new_str
+ * str.upcase -> new_str
+ * str.upcase([options]) -> new_str
*
* Returns a copy of <i>str</i> with all lowercase letters replaced with their
- * uppercase counterparts. The operation is locale insensitive---only
- * characters ``a'' to ``z'' are affected.
- * Note: case replacement is effective only in ASCII region.
+ * uppercase counterparts.
+ *
+ * See String#downcase for meaning of +options+ and use with different encodings.
*
* "hEllO".upcase #=> "HELLO"
*/
@@ -5915,11 +5918,13 @@ rb_str_upcase(int argc, VALUE *argv, VALUE str)
/*
* call-seq:
- * str.downcase! -> str or nil
+ * str.downcase! -> str or nil
+ * str.downcase!([options]) -> str or nil
*
* Downcases the contents of <i>str</i>, returning <code>nil</code> if no
* changes were made.
- * Note: case replacement is effective only in ASCII region.
+ *
+ * See String#downcase for meaning of +options+ and use with different encodings.
*/
static VALUE
@@ -6037,11 +6042,13 @@ rb_str_downcase(int argc, VALUE *argv, VALUE str)
/*
* call-seq:
- * str.capitalize! -> str or nil
+ * str.capitalize! -> str or nil
+ * str.capitalize!([options]) -> str or nil
*
* Modifies <i>str</i> by converting the first character to uppercase and the
* remainder to lowercase. Returns <code>nil</code> if no changes are made.
- * Note: case conversion is effective only in ASCII region.
+ *
+ * See String#downcase for meaning of +options+ and use with different encodings.
*
* a = "hello"
* a.capitalize! #=> "Hello"
@@ -6093,11 +6100,13 @@ rb_str_capitalize_bang(int argc, VALUE *argv, VALUE str)
/*
* call-seq:
- * str.capitalize -> new_str
+ * str.capitalize -> new_str
+ * str.capitalize([options]) -> new_str
*
* Returns a copy of <i>str</i> with the first character converted to uppercase
* and the remainder to lowercase.
- * Note: case conversion is effective only in ASCII region.
+ *
+ * See String#downcase for meaning of +options+ and use with different encodings.
*
* "hello".capitalize #=> "Hello"
* "HELLO".capitalize #=> "Hello"
@@ -6115,11 +6124,13 @@ rb_str_capitalize(int argc, VALUE *argv, VALUE str)
/*
* call-seq:
- * str.swapcase! -> str or nil
+ * str.swapcase! -> str or nil
+ * str.swapcase!([options]) -> str or nil
*
* Equivalent to <code>String#swapcase</code>, but modifies the receiver in
* place, returning <i>str</i>, or <code>nil</code> if no changes were made.
- * Note: case conversion is effective only in ASCII region.
+ *
+ * See String#downcase for meaning of +options+ and use with different encodings.
*/
static VALUE
@@ -6163,11 +6174,13 @@ rb_str_swapcase_bang(int argc, VALUE *argv, VALUE str)
/*
* call-seq:
- * str.swapcase -> new_str
+ * str.swapcase -> new_str
+ * str.swapcase([options]) -> new_str
*
* Returns a copy of <i>str</i> with uppercase alphabetic characters converted
* to lowercase and lowercase characters converted to uppercase.
- * Note: case conversion is effective only in ASCII region.
+ *
+ * See String#downcase for meaning of +options+ and use with different encodings.
*
* "Hello".swapcase #=> "hELLO"
* "cYbEr_PuNk11".swapcase #=> "CyBeR_pUnK11"