Permalink
Browse files

Make ThreadContext available

  • Loading branch information...
1 parent 969a3c4 commit 55676c22798d7590c1f0acf699b0677a87976c48 @ratnikov ratnikov committed Feb 23, 2014
Showing with 4 additions and 4 deletions.
  1. +4 −4 core/src/main/java/org/jruby/RubyDir.java
@@ -129,12 +129,12 @@ private void update() {
* must be created to reflect changes to the underlying file system.
*/
@JRubyMethod(compat = RUBY1_8)
- public IRubyObject initialize(IRubyObject arg) {
+ public IRubyObject initialize(ThreadContext context, IRubyObject arg) {
RubyString newPath = arg.convertToString();
path = newPath;
pos = 0;
- String adjustedPath = RubyFile.adjustRootPathOnWindows(getRuntime(), newPath.toString(), null);
+ String adjustedPath = RubyFile.adjustRootPathOnWindows(context.runtime, newPath.toString(), null);
checkDirIsTwoSlashesOnWindows(getRuntime(), adjustedPath);
dir = JRubyFile.create(getRuntime().getCurrentDirectory(), adjustedPath);
@@ -145,8 +145,8 @@ public IRubyObject initialize(IRubyObject arg) {
}
@JRubyMethod(name = "initialize", compat = RUBY1_9)
- public IRubyObject initialize19(IRubyObject arg) {
- return initialize(RubyFile.get_path(getRuntime().getCurrentContext(), arg));
+ public IRubyObject initialize19(ThreadContext context, IRubyObject arg) {
+ return initialize(context, RubyFile.get_path(context, arg));
}
// ----- Ruby Class Methods ----------------------------------------------------

0 comments on commit 55676c2

Please sign in to comment.