1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/pstore.rb, test/test_pstore.rb: suppress warnings with -v.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-09-13 11:21:52 +00:00
parent f7081431f2
commit 4e7c8bbe03
3 changed files with 5 additions and 4 deletions

View file

@ -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]

View file

@ -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

View file

@ -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