Skip to content

Commit

Permalink
Fix typos of previous docs PR
Browse files Browse the repository at this point in the history
In ruby#2612 I made two typos (extra ,, and copy-pasted
same line of code instead of showing two different
ones), fixing them.
  • Loading branch information
zverok committed Dec 22, 2019
1 parent 7c37f2c commit 78d3b0b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/syntax/exceptions.rdoc
Expand Up @@ -17,7 +17,7 @@ wish to limit the scope of rescued exceptions:
# ...
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
Expand Down
2 changes: 1 addition & 1 deletion enumerator.c
Expand Up @@ -316,7 +316,7 @@ proc_entry_ptr(VALUE proc_entry)
* 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
*
Expand Down

0 comments on commit 78d3b0b

Please sign in to comment.