diff options
Diffstat (limited to 'ext/psych/lib/psych/visitors/json_tree.rb')
-rw-r--r-- | ext/psych/lib/psych/visitors/json_tree.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/psych/lib/psych/visitors/json_tree.rb b/ext/psych/lib/psych/visitors/json_tree.rb index 0350dd1faa..0127ac8aa8 100644 --- a/ext/psych/lib/psych/visitors/json_tree.rb +++ b/ext/psych/lib/psych/visitors/json_tree.rb @@ -5,8 +5,11 @@ module Psych class JSONTree < YAMLTree include Psych::JSON::RubyEvents - def initialize options = {}, emitter = Psych::JSON::TreeBuilder.new - super + def self.create options = {} + emitter = Psych::JSON::TreeBuilder.new + class_loader = ClassLoader.new + ss = ScalarScanner.new class_loader + new(emitter, ss, options) end def accept target |