Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update documentation for each_* aliases

  • Loading branch information...
commit d32f5ad9b65909b7fde024a820dfead6c31178df 1 parent 21cd9e6
Nikolai Weibull authored
Showing with 4 additions and 3 deletions.
  1. +3 −2 ext/u/rb_u_string.c
  2. +1 −1  ext/u/rb_u_string_each_codepoint.c
View
5 ext/u/rb_u_string.c
@@ -261,8 +261,9 @@ rb_u_string_dup(VALUE self)
* Beyond interrogators there are quite a few methods for iterating over the
* content of a U::String, each viewing it in its own way: {#each_byte},
* {#each_char}, {#each_codepoint}, {#each_grapheme_cluster}, {#each_line}, and
- * {#each_word}. They all have aliases ({#bytes}, {#chars}, {#codepoints},
- * {#grapheme_clusters}, {#lines}, {#words}) that sometimes read better.
+ * {#each_word}. They all have respective methods ({#bytes}, {#chars},
+ * {#codepoints}, {#grapheme_clusters}, {#lines}, {#words}) that return an
+ * Array instead of yielding each result.
*
* Quite a few methods are devoted to extracting a substring of a U::String,
* namely {#[]}, {#slice}, {#byteslice}, {#chomp}, {#chop}, {#chr}, {#getbyte},
View
2  ext/u/rb_u_string_each_codepoint.c
@@ -35,7 +35,7 @@ rb_u_string_each_codepoint(VALUE self)
return self;
}
-/* @return [Array<U::String>] The code points of the receiver. */
+/* @return [Array<Integer>] The code points of the receiver. */
VALUE
rb_u_string_codepoints(VALUE self)
{
Please sign in to comment.
Something went wrong with that request. Please try again.