Skip to content

Commit

Permalink
Implement p6bool op for JVM.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed May 1, 2013
1 parent e14ef54 commit 623d45e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/vm/jvm/runtime/org/perl6/rakudo/Ops.java
Expand Up @@ -7,7 +7,16 @@
* Contains implementation of nqp:: ops specific to Rakudo Perl 6.
*/
public final class Ops {
private static SixModelObject False;
private static SixModelObject True;

public static SixModelObject p6settypes(SixModelObject conf, ThreadContext tc) {
False = conf.at_key_boxed(tc, "False");
True = conf.at_key_boxed(tc, "True");
return conf;
}

public static SixModelObject booleanize(int x) {
return x == 0 ? False : True;
}
}

0 comments on commit 623d45e

Please sign in to comment.