From 38297f330b41702e07460d18e6fac3f989a06a9a Mon Sep 17 00:00:00 2001 From: tenderlove Date: Sat, 24 Apr 2010 22:23:37 +0000 Subject: * ext/psych/lib/psych.rb: removing unused code * ext/psych/lib/psych/visitors/yaml_tree.rb: removing unused code git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/psych/lib/psych.rb | 2 +- ext/psych/lib/psych/visitors/yaml_tree.rb | 1 - 2 files changed, 1 insertion(+), 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 = {} -- cgit v1.2.3