Permalink
Browse files

Add backwards compat shims in case Java code is calling these methods

  • Loading branch information...
1 parent c1f333b commit cde69f8f285e4b86f1ff6d481997d6ca991d971b @enebo enebo committed Mar 3, 2014
Showing with 10 additions and 0 deletions.
  1. +10 −0 core/src/main/java/org/jruby/RubyDir.java
@@ -118,6 +118,11 @@ private void update() {
}
}
+ @Deprecated
+ public IRubyObject initialize(IRubyObject arg) {
+ return initialize(getRuntime().getCurrentContext(), arg);
+ }
+
/**
* Creates a new <code>Dir</code>. This method takes a snapshot of the
* contents of the directory at creation time, so changes to the contents
@@ -141,6 +146,11 @@ public IRubyObject initialize(ThreadContext context, IRubyObject arg) {
return this;
}
+ @Deprecated
+ public IRubyObject initialize19(IRubyObject arg) {
+ return initialize19(getRuntime().getCurrentContext(), arg);
+ }
+
@JRubyMethod(name = "initialize", compat = RUBY1_9)
public IRubyObject initialize19(ThreadContext context, IRubyObject arg) {
return initialize(context, RubyFile.get_path(context, arg));

0 comments on commit cde69f8

Please sign in to comment.