Created
April 30, 2015 13:29
-
-
Save bjfish/21ea81eee6d4aa24fa95 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
@CoreMethod(names = "home_directory", onSingleton = true) | |
public abstract static class HomeDirectoryNode extends CoreMethodNode { | |
public HomeDirectoryNode(RubyContext context, SourceSection sourceSection) { | |
super(context, sourceSection); | |
} | |
public HomeDirectoryNode(HomeDirectoryNode prev) { | |
super(prev); | |
} | |
@CompilerDirectives.TruffleBoundary | |
@Specialization | |
public RubyString homeDirectory() { | |
return getContext().makeString(getContext().getRuntime().getJRubyHome()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment