File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ def generate(obj, anIO = nil)
349349 !@ascii_only and !@script_safe and @max_nesting == 0 and ( !@strict || Symbol === obj )
350350 result = generate_json ( obj , '' . dup )
351351 else
352- result = obj . to_json ( self )
352+ result = + obj . to_json ( self )
353353 end
354354 JSON ::TruffleRuby ::Generator . valid_utf8? ( result ) or raise GeneratorError . new (
355355 "source sequence #{ result . inspect } is illegal/malformed utf-8" ,
@@ -517,7 +517,7 @@ def json_transform(state)
517517
518518 if empty?
519519 state . depth -= 1
520- return + '{}'
520+ return '{}'
521521 end
522522
523523 delim = ",#{ state . object_nl } "
@@ -609,7 +609,7 @@ def json_transform(state)
609609
610610 if empty?
611611 state . depth -= 1
612- return + '[]'
612+ return '[]'
613613 end
614614
615615 result = '[' . dup
@@ -736,17 +736,17 @@ def to_json(state = nil, *args)
736736
737737 module TrueClass
738738 # Returns a JSON string for true: 'true'.
739- def to_json ( *) + 'true' end
739+ def to_json ( *) 'true' end
740740 end
741741
742742 module FalseClass
743743 # Returns a JSON string for false: 'false'.
744- def to_json ( *) + 'false' end
744+ def to_json ( *) 'false' end
745745 end
746746
747747 module NilClass
748748 # Returns a JSON string for nil: 'null'.
749- def to_json ( *) + 'null' end
749+ def to_json ( *) 'null' end
750750 end
751751 end
752752 end
You can’t perform that action at this time.
0 commit comments