-
-
Save cj/1897233a373f0ebf5815 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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