From 1fe40b7cc5e92105f636d670d77b059fe4a4c50b Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 3 Oct 2001 07:19:19 +0000 Subject: * marshal.c (r_object): better allocation type check for TYPE_UCLASS. usage of allocation framework is disabled for now. * variable.c (rb_class_path): Module may have subclass. * string.c (rb_str_update): should maintain original negative offset. * string.c (rb_str_subpat_set): ditto * string.c (rb_str_aset): ditto. * re.c (rb_reg_nth_match): should check negative nth. * re.c (rb_reg_nth_defined): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/pstore.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/pstore.rb') diff --git a/lib/pstore.rb b/lib/pstore.rb index 43a0530dc8..651297cf8f 100644 --- a/lib/pstore.rb +++ b/lib/pstore.rb @@ -86,11 +86,11 @@ class PStore value = nil backup = @filename+"~" begin - file = File::open(@filename, "r+") + file = File::open(@filename, "rb+") orig = true rescue Errno::ENOENT raise if read_only - file = File::open(@filename, "w+") + file = File::open(@filename, "wb+") end file.flock(read_only ? File::LOCK_SH : File::LOCK_EX) if read_only -- cgit v1.2.3