diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-01 17:57:13 -0200 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-01 17:57:13 -0200 |
commit | 5a46605f4a1937b92c8ac6f79e1f50bcf58112ab (patch) | |
tree | d9734e424658d8d6de3a735db05689dbe8d104d9 /test/psych/test_yamldbm.rb | |
parent | 524da347f58842a788e205877e0ff7079cb9bad3 (diff) | |
download | psych-5a46605f4a1937b92c8ac6f79e1f50bcf58112ab.tar.gz |
merging from ruby
Diffstat (limited to 'test/psych/test_yamldbm.rb')
-rw-r--r-- | test/psych/test_yamldbm.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/psych/test_yamldbm.rb b/test/psych/test_yamldbm.rb index 165125f..c60a18f 100644 --- a/test/psych/test_yamldbm.rb +++ b/test/psych/test_yamldbm.rb @@ -1,10 +1,14 @@ # -*- coding: UTF-8 -*- -require 'test/unit' -require 'yaml/dbm' -require 'tmpdir' -Psych::DBM = YAML::DBM unless defined?(Psych::DBM) +begin + require 'test/unit' + require 'yaml/dbm' + require 'tmpdir' +rescue LoadError +end module Psych + ::Psych::DBM = ::YAML::DBM unless defined?(::Psych::DBM) + class YAMLDBMTest < Test::Unit::TestCase def setup @engine, YAML::ENGINE.yamler = YAML::ENGINE.yamler, 'psych' @@ -187,4 +191,4 @@ module Psych assert_equal([], @yamldbm.select {false}) end end -end +end if defined?(YAML::DBM) |