summaryrefslogtreecommitdiff
path: root/ext/psych/lib/psych/deprecated.rb
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-24 00:20:08 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-24 00:20:08 +0000
commitedcaae97415aef8e34924b696570c7a28669d39d (patch)
tree7e6597aefdac475926d68ae79c6e7e24e01099cc /ext/psych/lib/psych/deprecated.rb
parent8687db60a65082a2e76650e918279a2048337e5a (diff)
* ext/psych/lib/psych.rb: fixing documentation
* ext/psych/lib/psych/deprecated.rb: moving deprecated method to deprecated file git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych/lib/psych/deprecated.rb')
-rw-r--r--ext/psych/lib/psych/deprecated.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/psych/lib/psych/deprecated.rb b/ext/psych/lib/psych/deprecated.rb
index 26e431dd81..093f145302 100644
--- a/ext/psych/lib/psych/deprecated.rb
+++ b/ext/psych/lib/psych/deprecated.rb
@@ -20,6 +20,16 @@ module Psych
end
target.psych_to_yaml unless opts[:nodump]
end
+
+ def self.load_documents yaml, &block
+ if $VERBOSE
+ warn "#{caller[0]}: load_documents is deprecated, use load_stream"
+ end
+ list = load_stream yaml
+ return list unless block_given?
+ list.each(&block)
+ end
+
end
class Object