diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-24 22:23:37 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-24 22:23:37 +0000 |
commit | 38297f330b41702e07460d18e6fac3f989a06a9a (patch) | |
tree | 261dddd9bc9eca7309cb93db7c1f66b521bb488a /ext | |
parent | 2d9c05441220ec5079925994b074380a78d50d8a (diff) |
* 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
Diffstat (limited to 'ext')
-rw-r--r-- | ext/psych/lib/psych.rb | 2 | ||||
-rw-r--r-- | ext/psych/lib/psych/visitors/yaml_tree.rb | 1 |
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 = {} |