You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ifstate.strict? && !(false == value || true == value || nil == value || String === value || Array === value || Hash === value || Integer === value || Float === value)
457
-
raiseGeneratorError,"#{value.class} not allowed in JSON"
459
+
raiseGeneratorError.new("#{value.class} not allowed in JSON",value)
458
460
elsifvalue.respond_to?(:to_json)
459
461
result << value.to_json(state)
460
462
else
@@ -507,7 +509,7 @@ def json_transform(state)
507
509
result << delimunlessfirst
508
510
result << state.indent * depthifindent
509
511
ifstate.strict? && !(false == value || true == value || nil == value || String === value || Array === value || Hash === value || Integer === value || Float === value)
510
-
raiseGeneratorError,"#{value.class} not allowed in JSON"
512
+
raiseGeneratorError.new("#{value.class} not allowed in JSON",value)
511
513
elsifvalue.respond_to?(:to_json)
512
514
result << value.to_json(state)
513
515
else
@@ -536,13 +538,13 @@ def to_json(state = nil, *)
536
538
ifstate.allow_nan?
537
539
to_s
538
540
else
539
-
raiseGeneratorError,"#{self} not allowed in JSON"
541
+
raiseGeneratorError.new("#{self} not allowed in JSON",self)
540
542
end
541
543
whennan?
542
544
ifstate.allow_nan?
543
545
to_s
544
546
else
545
-
raiseGeneratorError,"#{self} not allowed in JSON"
547
+
raiseGeneratorError.new("#{self} not allowed in JSON",self)
0 commit comments