Skip to content

Instantly share code, notes, and snippets.

@arlandism
Last active December 1, 2017 01:00
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 arlandism/c8fdda18306852ee8d4ad569b371c4e8 to your computer and use it in GitHub Desktop.
Save arlandism/c8fdda18306852ee8d4ad569b371c4e8 to your computer and use it in GitHub Desktop.

Below, "run pry" means executing :! ruby assembler/main.rb from Vim.

My directory structure is:

╰─$ ls assembler
code.rb         main.rb         parser.rb       symbol_table.rb
# DOES NOT RUN PRY
$LOAD_PATH << File.expand_path(__FILE__)
require_relative 'parser'
require_relative 'symbol_table'
require_relative 'code'

puts "HI"
require 'pry';binding.pry
# DOES RUN PRY
$LOAD_PATH << File.expand_path(__FILE__)
require_relative 'parser'
require_relative 'symbol_table'
require_relative 'code'

puts "HI"
require 'pry';binding.pry
puts "HEY"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment