Small documentation adjustments for new/updated features#15634
Small documentation adjustments for new/updated features#15634zverok merged 6 commits intoruby:masterfrom
Conversation
| * | ||
| * With a block given, calls the block with successive elements of the array in | ||
| * reverse order; returns the last element for which the block returns a truthy | ||
| * reverse order; returns the first element for which the block returns a truthy |
There was a problem hiding this comment.
This is one thing I am not so sure about, but for me, this still seems less confusing: it iterates in reverse order, and [in that backward order], finds the first ever element matching the condition, not the last one. But maybe the whole paragraph is better to be rephrased somehow to fully remove the ambiguity.
There was a problem hiding this comment.
I think your change makes it clearer.
| * Raises +FiberError+ if called on a Fiber belonging to another +Thread+. | ||
| * | ||
| * See Kernel#raise for more information. | ||
| * See Kernel#raise for more information on arguments. |
There was a problem hiding this comment.
Not an issue with this PR, but it might be worth updating the Kernel#raise documentation to document that cause cannot be provided as the only argument to raise. This also applies to Fiber#raise and Thread#raise, but since they already reference Kernel#raise, does not need to be mentioned specifically in each.
There was a problem hiding this comment.
Makes sense 👍
Added one more separate commit with a (brief) phrase about that.
7f6052c to
271e835
Compare
❌ 2/67075 Tests Failedtest/fiber/test_scheduler.rb#test_close_at_exittest/ruby/test_gc.rb#test_stat |
271e835 to
31ef443
Compare
Just a bunch of stuff I've noticed while reviewing and checking through NEWS.md and the relevant docs. All small enough to not split into multiple PRs, I believe (but every change is in its own commit):
Range#to_setThread#raiseandFiber#raisesignature to includecause:Fiber#raise, it had excessive explanations duplicating (old) those ofKernel#raise, but noFiber-specific exampledoc/language/character_selectors.rdoc: addedString#stripto the list of methods that support selectorsdoc/syntax/calling_methods.rdoc: simplified the language about*nil, removing theNilClass#to_areferenceArray:#find: simplified code example a bit (it seems to be copied fromEnumerable#findwith then adjusting to arrays, but the additional example on array-of-pairs brought no new information)#rfind: rewrote code example a bit (was copied fromEnumerable#findwith output adjusted, but still used general enumerables, not arrays, as example objects)