Skip to content

Commit 44c87fb

Browse files
committed
Merge pull request #43 from launchdarkly/jko/fix-bool-options
Fix initialization of boolean options with false defaults
2 parents 789f2ab + e328bcf commit 44c87fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/ldclient-rb/config.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ def initialize(opts = {})
3030
@flush_interval = opts[:flush_interval] || Config.default_flush_interval
3131
@connect_timeout = opts[:connect_timeout] || Config.default_connect_timeout
3232
@read_timeout = opts[:read_timeout] || Config.default_read_timeout
33-
@log_timings = opts[:log_timings] || Config.default_log_timings
34-
@stream = opts[:stream] || Config.default_stream
3533
@feature_store = opts[:feature_store] || Config.default_feature_store
36-
@debug_stream = opts[:debug_stream] || Config.default_debug_stream
34+
@stream = opts.has_key?(:stream) ? opts[:stream] : Config.default_stream
35+
@log_timings = opts.has_key?(:log_timings) ? opts[:log_timings] : Config.default_log_timings
36+
@debug_stream = opts.has_key?(:debug_stream) ? opts[:debug_stream] : Config.default_debug_stream
3737
end
3838

3939
#

0 commit comments

Comments
 (0)