diff options
author | Charles Oliver Nutter <headius@headius.com> | 2021-02-25 17:49:59 -0600 |
---|---|---|
committer | Charles Oliver Nutter <headius@headius.com> | 2021-02-25 17:49:59 -0600 |
commit | bce2752499cce7a4697442e50ebc20f2f78e4a3e (patch) | |
tree | 872996e644d3899b9ea774b1db15390f9d6d269d | |
parent | ca1c154bd8d610e2dc5aa2f0443d0fd9b3e29a5f (diff) | |
download | psych-bce2752499cce7a4697442e50ebc20f2f78e4a3e.zip |
Minor optimization
-rw-r--r-- | ext/java/org/jruby/ext/psych/PsychEmitter.java | 3 |
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=") |