Skip to content

Instantly share code, notes, and snippets.

@elucid
Created September 17, 2016 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elucid/50bd0ee520342c5e569a2a5ab4b0cd4a to your computer and use it in GitHub Desktop.
Save elucid/50bd0ee520342c5e569a2a5ab4b0cd4a to your computer and use it in GitHub Desktop.
save useful stuff from IRB sessions
def save_irb(filename)
File.open(filename,'w') {|f| f.puts Readline::HISTORY.entries[0..-2]}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment