summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-11-01 17:57:13 -0200
committerAaron Patterson <aaron.patterson@gmail.com>2011-11-01 17:57:13 -0200
commit5a46605f4a1937b92c8ac6f79e1f50bcf58112ab (patch)
treed9734e424658d8d6de3a735db05689dbe8d104d9
parent524da347f58842a788e205877e0ff7079cb9bad3 (diff)
downloadpsych-5a46605f4a1937b92c8ac6f79e1f50bcf58112ab.tar.gz
merging from ruby
-rw-r--r--ext/psych/parser.c1
-rw-r--r--test/psych/test_yamldbm.rb14
2 files changed, 9 insertions, 6 deletions
diff --git a/ext/psych/parser.c b/ext/psych/parser.c
index 1a6e281..987fd7a 100644
--- a/ext/psych/parser.c
+++ b/ext/psych/parser.c
@@ -61,7 +61,6 @@ static VALUE allocate(VALUE klass)
static VALUE make_exception(yaml_parser_t * parser, VALUE path)
{
- VALUE exception;
size_t line, column;
line = parser->context_mark.line + 1;
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)