From cbbd977c444b6f1db2f771afd37175e259cd0e6a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 3 Oct 2014 01:50:21 +0000 Subject: tdb/mt: fix tests under Ruby 1.8 This will probably be the last release we make under Ruby 1.8 --- lib/tdb/mt.rb | 1 + test/test_tdb_mt.rb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/tdb/mt.rb b/lib/tdb/mt.rb index 4cea5f5..1bdbf3d 100644 --- a/lib/tdb/mt.rb +++ b/lib/tdb/mt.rb @@ -1,6 +1,7 @@ # -*- encoding: binary -*- # WARNING: this is not recommended, it is still possible to break this +require 'thread' module TDB::MT def initialize super diff --git a/test/test_tdb_mt.rb b/test/test_tdb_mt.rb index 5e38901..781e2bd 100644 --- a/test/test_tdb_mt.rb +++ b/test/test_tdb_mt.rb @@ -73,6 +73,10 @@ class Test_TDB_MT < Test::Unit::TestCase def test_check_methods m = TDB.instance_methods.sort + if String === m[0] + warn "skipping test under Ruby 1.8" + return + end m -= Object.instance_methods m -= Enumerable.instance_methods m.map! { |x| x.to_sym } -- cgit v1.2.3-24-ge0c7