-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
It looks like it's not possible to mix CompatVersions for overloads of a method.
What I mean by this: in #979, I wanted to say
@JRubyMethod(name = "count", compat = CompatVersion.RUBY1_8)
public static IRubyObject count18(ThreadContext context, IRubyObject self, final Block block) {
// snip
}
@JRubyMethod(compat = CompatVersion.RUBY1_9)
public static IRubyObject count(ThreadContext context, IRubyObject self, final Block block) {
//snip
}
@JRubyMethod
public static IRubyObject count(ThreadContext context, IRubyObject self, final IRubyObject methodArg, final Block block) {
//snip
}and have the version which takes method arg apply to all CompatVersions.
But until I explicitly declared this function with both a CompatVersion.RUBY1_8 and CompatVersion.RUBY1_9, JRuby was convinced that there was no count method that took an argument (i.e. the with-args count didn't get registered when declared like this).
Am I misunderstanding something here? Or is this something that would be nice to support?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels