Created
April 13, 2019 01:54
-
-
Save enebo/dfbeb603b137b89e647ef6853efe6623 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
@JRubyModule(name = "Oj") | |
public class RubyOj extends RubyModule { | |
// ... | |
@JRubyMethod(module = true, required = 1, rest = true) | |
public static IRubyObject strict_load(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) { | |
OjLibrary oj = resolveOj(self); | |
Options options = oj.default_options.dup(context); | |
ParserSource source = processArgs(context, args, options); | |
return new StrictParse(source, context, options).parse(oj, true, block); | |
} | |
public static OjLibrary resolveOj(IRubyObject self) { | |
return (OjLibrary) self.getInternalVariables().getInternalVariable("_oj"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment