diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/pstore.rb | 1 | ||||
-rw-r--r-- | test/test_pstore.rb | 4 |
3 files changed, 5 insertions, 4 deletions
@@ -1,4 +1,6 @@ -Tue Sep 13 15:02:48 2011 Nobuyoshi Nakada <nobu@ruby-lang.org> +Tue Sep 13 20:21:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * lib/pstore.rb, test/test_pstore.rb: suppress warnings with -v. * lib/pstore.rb (PStore): always open in binary mode even if default encodings are set. [Bug #5311] [ruby-core:39503] diff --git a/lib/pstore.rb b/lib/pstore.rb index 020b028666..429d7e5c7d 100644 --- a/lib/pstore.rb +++ b/lib/pstore.rb @@ -437,6 +437,7 @@ class PStore rescue result = false end + self.class.instance_method(:marshal_dump_supports_canonical_option?) self.class.__send__(:define_method, :marshal_dump_supports_canonical_option?) do result end diff --git a/test/test_pstore.rb b/test/test_pstore.rb index 21831903cf..e8a1032c98 100644 --- a/test/test_pstore.rb +++ b/test/test_pstore.rb @@ -116,10 +116,8 @@ class PStoreTest < Test::Unit::TestCase def test_pstore_files_are_accessed_as_binary_files bug5311 = '[ruby-core:39503]' n = 128 - assert_in_out_err(["-rpstore", "-", @pstore_file], <<-SRC, [bug5311], [], bug5311) + assert_in_out_err(["-Eutf-8:utf-8", "-rpstore", "-", @pstore_file], <<-SRC, [bug5311], [], bug5311) @pstore = PStore.new(ARGV[0]) - Encoding.default_internal = 'utf-8' - Encoding.default_external = 'utf-8' (1..#{n}).each do |i| @pstore.transaction {@pstore["Key\#{i}"] = "value \#{i}"} end |