From 377cbae8379f6b9dbd0b0a3068207489a26eb106 Mon Sep 17 00:00:00 2001 From: Kyrylo Silin Date: Tue, 26 Mar 2013 11:30:04 +0200 Subject: [PATCH] BasicEditor: fix `edit` subcommand Fix theme creation functionality. --- lib/pry-theme/basic_editor.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/pry-theme/basic_editor.rb b/lib/pry-theme/basic_editor.rb index ac6ac60..481f94f 100644 --- a/lib/pry-theme/basic_editor.rb +++ b/lib/pry-theme/basic_editor.rb @@ -29,6 +29,7 @@ def start_editing if @new_theme @output.puts 'Created a new theme.' @current_file.puts template + @current_file.close end @output.puts "Opened in #{ @editor }: #{ themify(@filename) }" @@ -39,8 +40,6 @@ def start_editing reload_theme! output_dashy_header("Edited \"#@filename\"") - ensure - @current_file.close end private