class JSON::TruffleRuby::Generator::State

def self.from_state(opts)

returned.
an unconfigured instance. If _opts_ is a State object, it is just
a new State instance configured by _opts_, something else to create
Creates a State object from _opts_, which ought to be Hash to create
def self.from_state(opts)
  case
  when self === opts
    opts
  when opts.respond_to?(:to_hash)
    new(opts.to_hash)
  when opts.respond_to?(:to_h)
    new(opts.to_h)
  else
    SAFE_STATE_PROTOTYPE.dup
  end
end