@@ -364,15 +364,15 @@ def is_feature_enabled( # rubocop:disable Naming/PredicateName
364364 !!response
365365 end
366366
367- # @param [String] flag_key The unique flag key of the feature flag
367+ # @param [String, Symbol ] flag_key The unique flag key of the feature flag
368368 # @return [String] The decrypted value of the feature flag payload
369369 def get_remote_config_payload ( flag_key )
370- @feature_flags_poller . get_remote_config_payload ( flag_key )
370+ @feature_flags_poller . get_remote_config_payload ( flag_key . to_s )
371371 end
372372
373373 # Returns whether the given feature flag is enabled for the given user or not
374374 #
375- # @param [String] key The key of the feature flag
375+ # @param [String, Symbol ] key The key of the feature flag
376376 # @param [String] distinct_id The distinct id of the user
377377 # @param [Hash] groups
378378 # @param [Hash] person_properties key-value pairs of properties to associate with the user.
@@ -455,7 +455,7 @@ def get_feature_flag_result(
455455 # @param [Hash] group_properties
456456 # @param [Boolean] only_evaluate_locally Skip the remote /flags call entirely
457457 # @param [Boolean] disable_geoip Stamped on captured access events
458- # @param [Array<String>] flag_keys When set, scopes the underlying /flags
458+ # @param [Array<String, Symbol >] flag_keys When set, scopes the underlying /flags
459459 # request to only these flag keys (sent as `flag_keys_to_evaluate`).
460460 # Distinct from {FeatureFlagEvaluations#only}, which filters the
461461 # already-fetched snapshot in memory.
@@ -598,7 +598,7 @@ def get_all_flags(
598598 # @deprecated Use {#get_feature_flag_result} instead, which returns both the flag value and payload
599599 # and properly raises the $feature_flag_called event.
600600 #
601- # @param [String] key The key of the feature flag
601+ # @param [String, Symbol ] key The key of the feature flag
602602 # @param [String] distinct_id The distinct id of the user
603603 # @option [String or boolean] match_value The value of the feature flag to be matched
604604 # @option [Hash] groups
@@ -623,6 +623,7 @@ def get_feature_flag_payload(
623623 'instead — this consolidates flag evaluation into a single `/flags` request per ' \
624624 'incoming request.'
625625 )
626+ key = key . to_s
626627 person_properties , group_properties = add_local_person_and_group_properties ( distinct_id , groups ,
627628 person_properties , group_properties )
628629 @feature_flags_poller . get_feature_flag_payload ( key , distinct_id , match_value , groups , person_properties ,
@@ -725,6 +726,7 @@ def _get_feature_flag_result(
725726 only_evaluate_locally : false ,
726727 send_feature_flag_events : true
727728 )
729+ key = key . to_s
728730 person_properties , group_properties = add_local_person_and_group_properties (
729731 distinct_id , groups , person_properties , group_properties
730732 )
0 commit comments