Skip to content

Commit

Permalink
Suppress the warning about requiring the json.rb file
Browse files Browse the repository at this point in the history
  • Loading branch information
ohler55 committed Aug 13, 2023
1 parent 904d80c commit 56b6d84
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/oj/json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
require 'oj/state'

if defined?(JSON::PRETTY_STATE_PROTOTYPE)
warn "WARNING: oj/json is a compatability shim used by Oj. Requiring the file explicitly is no recommended."
# There are enough people that try to use both the json gen and oj in mimic
# mode so don't display the warning.

# warn "WARNING: oj/json is a compatability shim used by Oj. Requiring the file explicitly is not recommended."
end

unless defined?(JSON::PRETTY_STATE_PROTOTYPE)
Expand Down

0 comments on commit 56b6d84

Please sign in to comment.