Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update active_support_core_extensions.md [ci skip] #30393

Merged
merged 1 commit into from
Aug 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions guides/source/active_support_core_extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ Specifically performs these transformations:
* Capitalizes the first word.

The capitalization of the first word can be turned off by setting the
+:capitalize+ option to false (default is true).
`:capitalize` option to false (default is true).

```ruby
"name".humanize # => "Name"
Expand Down Expand Up @@ -2359,7 +2359,7 @@ This method is similar in purpose to `Kernel#Array`, but there are some differen

* If the argument responds to `to_ary` the method is invoked. `Kernel#Array` moves on to try `to_a` if the returned value is `nil`, but `Array.wrap` returns an array with the argument as its single element right away.
* If the returned value from `to_ary` is neither `nil` nor an `Array` object, `Kernel#Array` raises an exception, while `Array.wrap` does not, it just returns the value.
* It does not call `to_a` on the argument, if the argument does not respond to +to_ary+ it returns an array with the argument as its single element.
* It does not call `to_a` on the argument, if the argument does not respond to `to_ary` it returns an array with the argument as its single element.

The last point is particularly worth comparing for some enumerables:

Expand Down