From 8e1d049ee439948097b8de52bf02505fb7332869 Mon Sep 17 00:00:00 2001 From: Myles Eftos Date: Thu, 17 Sep 2009 08:22:24 +0800 Subject: [PATCH] Updated File.open and File.new signature --- fakefs.gemspec | 2 +- lib/fakefs/file.rb | 8 ++++---- lib/fakefs/version.rb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) 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