summaryrefslogtreecommitdiff
path: root/ext/psych
diff options
context:
space:
mode:
Diffstat (limited to 'ext/psych')
-rw-r--r--ext/psych/lib/psych.rb2
-rw-r--r--ext/psych/lib/psych/visitors/yaml_tree.rb1
2 files changed, 1 insertions, 2 deletions
diff --git a/ext/psych/lib/psych.rb b/ext/psych/lib/psych.rb
index 59f9712fcd..6c892c5393 100644
--- a/ext/psych/lib/psych.rb
+++ b/ext/psych/lib/psych.rb
@@ -182,7 +182,7 @@ module Psych
###
# Dump Ruby object +o+ to a JSON string.
def self.to_json o
- visitor = Psych::Visitors::JSONTree.new(:json => true)
+ visitor = Psych::Visitors::JSONTree.new
visitor << o
visitor.tree.to_yaml
end
diff --git a/ext/psych/lib/psych/visitors/yaml_tree.rb b/ext/psych/lib/psych/visitors/yaml_tree.rb
index 5e773c921e..5e73ec80a6 100644
--- a/ext/psych/lib/psych/visitors/yaml_tree.rb
+++ b/ext/psych/lib/psych/visitors/yaml_tree.rb
@@ -5,7 +5,6 @@ module Psych
def initialize options = {}
super()
- @json = options[:json]
@tree = Nodes::Stream.new
@stack = []
@st = {}