summaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-16 13:23:16 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-16 13:23:16 +0000
commit21ef44b67ee99834ae36ae39e89f48cdd2dc1a70 (patch)
treea8680a2df5dd2466efec7b238ed6f091830a1087 /string.c
parentbade487125a7a34656a1b3770ead462cd1784b57 (diff)
downloadruby-21ef44b67ee99834ae36ae39e89f48cdd2dc1a70.tar.gz
ruby-21ef44b67ee99834ae36ae39e89f48cdd2dc1a70.tar.xz
ruby-21ef44b67ee99834ae36ae39e89f48cdd2dc1a70.zip
* string.c (rb_str_concat): fix rdoc. (codepoint is integer)
* string.c (rb_str_each_codepoint): use UINT2NUM. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/string.c b/string.c
index dafabe43e..501320ae2 100644
--- a/string.c
+++ b/string.c
@@ -1712,13 +1712,13 @@ rb_str_append(VALUE str, VALUE str2)
/*
* call-seq:
- * str << fixnum => str
- * str.concat(fixnum) => str
+ * str << integer => str
+ * str.concat(integer) => str
* str << obj => str
* str.concat(obj) => str
*
* Append---Concatenates the given object to <i>str</i>. If the object is a
- * <code>Fixnum</code>, it is considered as a codepoint, and is converted
+ * <code>Integer</code>, it is considered as a codepoint, and is converted
* to a character before concatenation.
*
* a = "hello "
@@ -5523,7 +5523,7 @@ rb_str_each_char(VALUE str)
/*
* Document-method: each_codepoint
* call-seq:
- * str.each_codepoint {|fixnum| block } => str
+ * str.each_codepoint {|integer| block } => str
*
* Passes the <code>Integer</code> ordinal of each character in <i>str</i>,
* also known as a <i>codepoint</i> when applied to Unicode strings to the
@@ -5553,7 +5553,7 @@ rb_str_each_codepoint(VALUE str)
while (ptr < end) {
c = rb_enc_codepoint(ptr, end, enc);
n = rb_enc_codelen(c, enc);
- rb_yield(INT2FIX(c));
+ rb_yield(UINT2NUM(c));
ptr += n;
}
return str;