From 7a6590823933a0881d908e4e56e3aa239b069b68 Mon Sep 17 00:00:00 2001 From: Michael Crismali Date: Sat, 3 Jan 2015 11:04:51 -0600 Subject: [PATCH] Removed file caching to allow live reloading of files --- lib/method_source.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/method_source.rb b/lib/method_source.rb index 7d16c3b..8e217ce 100644 --- a/lib/method_source.rb +++ b/lib/method_source.rb @@ -49,8 +49,7 @@ def self.comment_helper(source_location, name=nil) # @return [Array] the contents of the file # @raise [SourceNotFoundError] def self.lines_for(file_name, name=nil) - @lines_for_file ||= {} - @lines_for_file[file_name] ||= File.readlines(file_name) + File.readlines(file_name) rescue Errno::ENOENT => e raise SourceNotFoundError, "Could not load source for #{name}: #{e.message}" end