Skip to content

Misleading expression in Methods, Blocks, and Procs #11

@JavascriptMick

Description

@JavascriptMick

Hi

I think this is misleading

say_these_things(thing2="ha")

it implies that you are explicitly specifying the thing2 variable and leaving thing1 as it's default but in fact, you are simply passing a value for thing1 which is the return value for the expression thing2="ha".. which is "ha"..

2.1.0 :069 > say_these_things(thing2="ha")
ha
blah
=> nil

I'm not even sure if it is possible to explicitly specify a named variable when calling a method.. if it is not possible, perhaps might be better to leave this bit out entirely

Michael

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions