From 611708386e076b4e4b220f58ac78879edf56cdbb Mon Sep 17 00:00:00 2001 From: Larry Gilbert Date: Mon, 7 Jan 2013 15:02:39 -0800 Subject: [PATCH] Fix calls to Tempfile.new (GH issue #792) Suffix of "*.rb" caused temp files to be named with "*.rb" at the end, literally. Not all file systems like that, and it's almost certainly not what was intended. --- spec/commands/cat_spec.rb | 2 +- spec/commands/edit_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/commands/cat_spec.rb b/spec/commands/cat_spec.rb index fd3623c1..28f79519 100644 --- a/spec/commands/cat_spec.rb +++ b/spec/commands/cat_spec.rb @@ -143,7 +143,7 @@ describe "cat" do it 'each successive cat --ex should show the next level of backtrace, and going past the final level should return to the first' do temp_files = [] 3.times do |i| - temp_files << Tempfile.new(['pry', '*.rb']) + temp_files << Tempfile.new(['pry', '.rb']) temp_files.last << "bt number #{i}" temp_files.last.flush end diff --git a/spec/commands/edit_spec.rb b/spec/commands/edit_spec.rb index 9bb9d770..24ca3e9d 100644 --- a/spec/commands/edit_spec.rb +++ b/spec/commands/edit_spec.rb @@ -321,7 +321,7 @@ describe "edit" do describe "old edit-method tests now migrated to edit" do describe "on a method defined in a file" do before do - @tempfile = (Tempfile.new(['pry', '*.rb'])) + @tempfile = (Tempfile.new(['pry', '.rb'])) @tempfile.puts <<-EOS module A def a