Skip to content

Add Kernel#Array behavior with nil to the documentation #113

Description

@YannIsCoding

Kernel#Array returns an empty array when given nil. However, nil is retained when given an array containing nil. Unfortunately, this somehow surprising behavior is not documented.

Array(nil) # => []
Array([nil]) # => [nil]

Shall I open a PR to remedy this? :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions