Skip to content

Instantly share code, notes, and snippets.

@cj

cj/call.rb Secret

Created October 15, 2014 18:44
Show Gist options
  • Save cj/1897233a373f0ebf5815 to your computer and use it in GitHub Desktop.
Save cj/1897233a373f0ebf5815 to your computer and use it in GitHub Desktop.
add_special :require_relative do
arg = arglist[1]
file = compiler.file
if arg[0] == :str
compiler.requires << arg[1]
end
push fragment("self.$require(#{file.inspect}+ '/../' + ")
push process(arglist)
push fragment(')')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment