From 8b31af74b7f8bff2738fd19629d8c2517d2ef67b Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 16 Sep 2008 13:23:16 +0000 Subject: * string.c (rb_str_concat): fix rdoc. (codepoint is integer) * string.c (rb_str_each_codepoint): use UINT2NUM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ string.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14a0ff520f..e8f2e278ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Sep 16 22:21:33 2008 NARUSE, Yui + + * string.c (rb_str_concat): fix rdoc. (codepoint is integer) + + * string.c (rb_str_each_codepoint): use UINT2NUM. + Tue Sep 16 21:48:55 2008 NARUSE, Yui * re.c (rb_reg_desc): Regexp#inspect should be US-ASCII. diff --git a/string.c b/string.c index dafabe43e3..501320ae25 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 str. If the object is a - * Fixnum, it is considered as a codepoint, and is converted + * Integer, 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 Integer ordinal of each character in str, * also known as a codepoint 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; -- cgit v1.2.3