summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorCharles Oliver Nutter <headius@headius.com>2022-09-19 11:39:25 -0500
committerCharles Oliver Nutter <headius@headius.com>2022-09-19 11:39:25 -0500
commit7b9d10c9dc2bb4dd71cb44f77d209a9f05f7def8 (patch)
tree030c856420912e115e1636b90c90cf8408a51135 /ext
parentaf50867197df587ef4007fedf1736c4faa7cbf64 (diff)
downloadpsych-7b9d10c9dc2bb4dd71cb44f77d209a9f05f7def8.tar.gz
Unbreak JRuby ext parse method
The changes in #580 renamed the native parse method and changed its signature to be fixed-arity with three arguments. This patch makes the same change to the JRuby extension to unbreak it.
Diffstat (limited to 'ext')
-rw-r--r--ext/java/org/jruby/ext/psych/PsychParser.java13
1 files changed, 2 insertions, 11 deletions
diff --git a/ext/java/org/jruby/ext/psych/PsychParser.java b/ext/java/org/jruby/ext/psych/PsychParser.java
index 8539110..9d116fa 100644
--- a/ext/java/org/jruby/ext/psych/PsychParser.java
+++ b/ext/java/org/jruby/ext/psych/PsychParser.java
@@ -108,13 +108,6 @@ public class PsychParser extends RubyObject {
super(runtime, klass);
}
- @JRubyMethod
- public IRubyObject parse(ThreadContext context, IRubyObject yaml) {
- Ruby runtime = context.runtime;
-
- return parse(context, yaml, runtime.getNil());
- }
-
private IRubyObject stringOrNilFor(ThreadContext context, String value, boolean tainted) {
if (value == null) return context.nil;
@@ -192,8 +185,8 @@ public class PsychParser extends RubyObject {
}
}
- @JRubyMethod
- public IRubyObject parse(ThreadContext context, IRubyObject yaml, IRubyObject path) {
+ @JRubyMethod(name = "_native_parse")
+ public IRubyObject parse(ThreadContext context, IRubyObject handler, IRubyObject yaml, IRubyObject path) {
Ruby runtime = context.runtime;
boolean tainted = yaml.isTaint() || yaml instanceof RubyIO;
@@ -204,8 +197,6 @@ public class PsychParser extends RubyObject {
path = yaml.callMethod(context, "path");
}
- IRubyObject handler = getInstanceVariable("@handler");
-
while (true) {
event = parser.getEvent();