summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/psych.rb2
-rw-r--r--lib/psych/visitors/yaml_tree.rb1
2 files changed, 1 insertions, 2 deletions
diff --git a/lib/psych.rb b/lib/psych.rb
index 59f9712..6c892c5 100644
--- a/lib/psych.rb
+++ b/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/lib/psych/visitors/yaml_tree.rb b/lib/psych/visitors/yaml_tree.rb
index 5e773c9..5e73ec8 100644
--- a/lib/psych/visitors/yaml_tree.rb
+++ b/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 = {}