Commit e828bf95 authored by Stan Hu's avatar Stan Hu

Fix Ruby 2.7 deprecation warning in JSON module

In Ruby 3.0, positional arguments and keyword arguments will be
separated. Ruby 2.7 will warn for behaviors that will change in Ruby
3.0. In most cases, you can avoid the incompatibility by adding the
double splat operator. It explicitly specifies passing keyword arguments
instead of a Hash object.
parent e77d0d12
...@@ -22,7 +22,7 @@ module Gitlab ...@@ -22,7 +22,7 @@ module Gitlab
string = string.to_s unless string.is_a?(String) string = string.to_s unless string.is_a?(String)
legacy_mode = legacy_mode_enabled?(opts.delete(:legacy_mode)) legacy_mode = legacy_mode_enabled?(opts.delete(:legacy_mode))
data = adapter_load(string, opts) data = adapter_load(string, **opts)
handle_legacy_mode!(data) if legacy_mode handle_legacy_mode!(data) if legacy_mode
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment