Skip to content

Calling to_json on FeatureFlagsState instance throws error in Ruby 2.5.6 #164

@binan-trc

Description

@binan-trc

Describe the bug
In our Ruby 2.5.6 app, calling to_json on a FeatureFlagsState instance throws error.

To reproduce
Initialize a LDClient instance.
Call all_flags_state to get the FeatureFlagsState instance.
Call to_json on the FeatureFlagsState instance to get the error.

(If I call as_json.to_json instead of just to_json, it works)

Expected behavior
It should return the corresponding JSON string.

Logs
Traceback (most recent call last):
NoMethodError (undefined method `merge' for []:Array)

SDK version
5.8.0

Language version, developer tools
Ruby 2.5.6

OS/platform
Ubuntu 14.04

Additional context
The same statement works fine in our Ruby 2.4.5 app.

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