Skip to content

Commit

Permalink
Does Hash#try_convert work in all supported Ruby versions?
Browse files Browse the repository at this point in the history
  • Loading branch information
brasmusson committed Jul 30, 2015
1 parent 540936f commit 4e51baf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/cucumber/cli/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def paths
end

def to_hash
Hash(@options).merge(out_stream: @out_stream, error_stream: @error_stream)
Hash.try_convert(@options).merge(out_stream: @out_stream, error_stream: @error_stream)
end

private
Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/cli/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def check_formatter_stream_conflicts()
end

def to_hash
Hash(@options)
Hash.try_convert(@options)
end

protected
Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def self.default
end

def initialize(user_options = {})
@options = default_options.merge(Hash(user_options))
@options = default_options.merge(Hash.try_convert(user_options))
end

# TODO: Actually Deprecate???
Expand Down

0 comments on commit 4e51baf

Please sign in to comment.