Updated File.open and File.new signature

This commit is contained in:
Myles Eftos 2009-09-17 08:22:24 +08:00
parent f6031458cd
commit 8e1d049ee4
3 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@
Gem::Specification.new do |s|
s.name = %q{fakefs}
s.version = "0.1.5"
s.version = "0.1.6"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Chris Wanstrath"]

View File

@ -65,11 +65,11 @@ module FakeFS
FileSystem.find(symlink.target).to_s
end
def self.open(path, mode='r')
def self.open(path, mode='r', perm = 0644)
if block_given?
yield new(path, mode)
yield new(path, mode, perm)
else
new(path, mode)
new(path, mode, perm)
end
end
@ -87,7 +87,7 @@ module FakeFS
end
attr_reader :path
def initialize(path, mode = nil)
def initialize(path, mode = nil, perm = nil)
@path = path
@mode = mode
@file = FileSystem.find(path)

View File

@ -1,6 +1,6 @@
module FakeFS
module Version
VERSION = "0.1.5"
VERSION = "0.1.6"
def self.to_s
VERSION