From 3191aadd94dd73c25fc203b68e90981d788fa3b9 Mon Sep 17 00:00:00 2001 From: Wojciech Piekutowski Date: Sun, 20 Feb 2011 15:39:46 +0100 Subject: [PATCH] Silence Encoding.default_internal= warnings --- test/bson/bson_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/bson/bson_test.rb b/test/bson/bson_test.rb index 869f638..9800edd 100644 --- a/test/bson/bson_test.rb +++ b/test/bson/bson_test.rb @@ -137,14 +137,14 @@ class BSONTest < Test::Unit::TestCase str = "壁に耳あり、障子に目あり" bson = BSON::BSON_CODER.serialize("x" => str) - Encoding.default_internal = 'EUC-JP' + silently { Encoding.default_internal = 'EUC-JP' } out = BSON::BSON_CODER.deserialize(bson)["x"] assert_equal Encoding.default_internal, out.encoding assert_equal str.encode('EUC-JP'), out assert_equal str, out.encode(str.encoding) ensure - Encoding.default_internal = before_enc + silently { Encoding.default_internal = before_enc } end end