Skip to content

NoMethodError: undefined method `empty?' when activating an integer id #101

Closed
@clinejj

Description

@clinejj

It looks like #63 introduced an error where the DecisionService#get_variation calls get_forced_variation, which doesn't validate that the user ID is a string before calling empty? at https://github.com/optimizely/ruby-sdk/blob/master/lib/optimizely/project_config.rb#L279

This leads to a NoMethodError when trying to activate an experiment or getting a variation for an integer based user id. #93 fixed some of these validations, but not all of them.

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