Skip to content

Commit

Permalink
Add backwards compat shims in case Java code is calling these methods
Browse files Browse the repository at this point in the history
  • Loading branch information
enebo committed Mar 3, 2014
1 parent c1f333b commit cde69f8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/src/main/java/org/jruby/RubyDir.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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));
Expand Down

0 comments on commit cde69f8

Please sign in to comment.