[前][次][番号順一覧][スレッド一覧]

ruby-changes:59389

From: zverok <ko1@a...>
Date: Mon, 23 Dec 2019 08:37:18 +0900 (JST)
Subject: [ruby-changes:59389] a4b99f9764 (master): Fix typos of previous docs PR

https://git.ruby-lang.org/ruby.git/commit/?id=a4b99f9764

From a4b99f97642d31fc8ddd537155ff6cf61be6a43c Mon Sep 17 00:00:00 2001
From: zverok <zverok.offline@g...>
Date: Sun, 22 Dec 2019 22:56:44 +0200
Subject: Fix typos of previous docs PR

In #2612 I made two typos (extra ,, and copy-pasted
same line of code instead of showing two different
ones), fixing them.

diff --git a/doc/syntax/exceptions.rdoc b/doc/syntax/exceptions.rdoc
index 7fd58c8..31e2f01 100644
--- a/doc/syntax/exceptions.rdoc
+++ b/doc/syntax/exceptions.rdoc
@@ -17,7 +17,7 @@ wish to limit the scope of rescued exceptions: https://github.com/ruby/ruby/blob/trunk/doc/syntax/exceptions.rdoc#L17
     # ...
   end
 
-The same is true for, +class+, +module+, and +block+:
+The same is true for a +class+, +module+, and +block+:
 
   [0, 1, 2].map do |i|
     10 / i
diff --git a/enumerator.c b/enumerator.c
index 0aa395a..e8ee9e5 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -316,7 +316,7 @@ proc_entry_ptr(VALUE proc_entry) https://github.com/ruby/ruby/blob/trunk/enumerator.c#L316
  *   some_method(a.to_enum)
  *
  *   # String#split in block form is more memory-effective:
- *   very_large_string.to_enum(:split, "|") { |chunk| return chunk if chunk.include?('DATE') }
+ *   very_large_string.split("|") { |chunk| return chunk if chunk.include?('DATE') }
  *   # This could be rewritten more idiomatically with to_enum:
  *   very_large_string.to_enum(:split, "|").lazy.grep(/DATE/).first
  *
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]