Module: Byebug::SaveFunctions
- Defined in:
- lib/byebug/commands/save.rb
Instance Method Summary collapse
-
#open_save ⇒ Object
Create a temporary file to write in if file is nil.
Instance Method Details
#open_save ⇒ Object
Create a temporary file to write in if file is nil
4 5 6 7 8 9 10 11 12 |
# File 'lib/byebug/commands/save.rb', line 4 def open_save require "tempfile" file = Tempfile.new("byebug-save") # We want close to not unlink, so redefine. def file.close @tmpfile.close if @tmpfile end return file end |