diff --git a/fakefs.gemspec b/fakefs.gemspec index 11ef2ed..1dea96e 100644 --- a/fakefs.gemspec +++ b/fakefs.gemspec @@ -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"] diff --git a/lib/fakefs/file.rb b/lib/fakefs/file.rb index 85b66bb..936ee93 100644 --- a/lib/fakefs/file.rb +++ b/lib/fakefs/file.rb @@ -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) diff --git a/lib/fakefs/version.rb b/lib/fakefs/version.rb index bebb192..e5d3f1d 100644 --- a/lib/fakefs/version.rb +++ b/lib/fakefs/version.rb @@ -1,6 +1,6 @@ module FakeFS module Version - VERSION = "0.1.5" + VERSION = "0.1.6" def self.to_s VERSION