summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Oliver Nutter <headius@headius.com>2021-02-25 17:49:59 -0600
committerCharles Oliver Nutter <headius@headius.com>2021-02-25 17:49:59 -0600
commitbce2752499cce7a4697442e50ebc20f2f78e4a3e (patch)
tree872996e644d3899b9ea774b1db15390f9d6d269d
parentca1c154bd8d610e2dc5aa2f0443d0fd9b3e29a5f (diff)
downloadpsych-bce2752499cce7a4697442e50ebc20f2f78e4a3e.zip
Minor optimization
-rw-r--r--ext/java/org/jruby/ext/psych/PsychEmitter.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/java/org/jruby/ext/psych/PsychEmitter.java b/ext/java/org/jruby/ext/psych/PsychEmitter.java
index 1026f00..be6e388 100644
--- a/ext/java/org/jruby/ext/psych/PsychEmitter.java
+++ b/ext/java/org/jruby/ext/psych/PsychEmitter.java
@@ -38,6 +38,7 @@ import org.jcodings.Encoding;
import org.jcodings.specific.UTF8Encoding;
import org.jruby.Ruby;
import org.jruby.RubyArray;
+import org.jruby.RubyBoolean;
import org.jruby.RubyClass;
import org.jruby.RubyFixnum;
import org.jruby.RubyModule;
@@ -306,7 +307,7 @@ public class PsychEmitter extends RubyObject {
@JRubyMethod
public IRubyObject canonical(ThreadContext context) {
// TODO: unclear if this affects a running emitter
- return context.runtime.newBoolean(options.isCanonical());
+ return RubyBoolean.newBoolean(context, options.isCanonical());
}
@JRubyMethod(name = "indentation=")