Skip to content

JSON.dump does not work in version 2.7.0 when the argument is an implicit Hash #553

@Uaitt

Description

@Uaitt

On version 2.6.3

JSON.dump(a:1, b:2, c:3)
#=> "{\"a\":1,\"b\":2,\"c\":3}"

On version 2.7.0

JSON.dump(a:1, b:2, c:3)
ArgumentError: wrong number of arguments (given 0, expected 1..3)

In order to get it to work in 2.7.0 you need to do:

JSON.dump({ a:1, b:2, c:3} )
#=> "{\"a\":1,\"b\":2,\"c\":3}"

The problem lies in this change 978ee15#diff-e08e7b431f64661c031319f3bbbec311665959cd74a86f605975fe62ffe8c93d

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