Skip to content

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

@YannIsCoding

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? :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions