Commit 36bdbead authored by Robert May's avatar Robert May

Skip string conversion if string

parent 4e8fd2d9
...@@ -19,7 +19,7 @@ module Gitlab ...@@ -19,7 +19,7 @@ module Gitlab
# First we should ensure this really is a string, not some other # First we should ensure this really is a string, not some other
# type which purports to be a string. This handles some legacy # type which purports to be a string. This handles some legacy
# usage of the JSON class. # usage of the JSON class.
string = string.to_s 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)
......
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