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
# Note: Float is handled this way since Float#to_s is slow anyway
369
375
buf << obj.to_json(self)
@@ -539,10 +545,10 @@ def json_transform(state)
539
545
each{ |value|
540
546
result << delimunlessfirst
541
547
result << state.indent * depthifindent
542
-
ifstate.strict? && !(false == value || true == value || nil == value || String === value || Array === value || Hash === value || Integer === value || Float === value || Fragment === value)
548
+
ifstate.strict? && !(false == value || true == value || nil == value || String === value || Array === value || Hash === value || Integer === value || Float === value || Fragment === value || Symbol == value)
543
549
ifstate.as_json
544
550
value=state.as_json.call(value)
545
-
unlessfalse == value || true == value || nil == value || String === value || Array === value || Hash === value || Integer === value || Float === value || Fragment === value
551
+
unlessfalse == value || true == value || nil == value || String === value || Array === value || Hash === value || Integer === value || Float === value || Fragment === value || Symbol === value
546
552
raiseGeneratorError.new("#{value.class} returned by #{state.as_json} not allowed in JSON",value)
0 commit comments