Created
October 28, 2009 17:14
-
-
Save enebo/220624 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/org/jruby/RubyDir.java b/src/org/jruby/RubyDir.java | |
index a8d9508..19d5089 100644 | |
--- a/src/org/jruby/RubyDir.java | |
+++ b/src/org/jruby/RubyDir.java | |
@@ -392,11 +392,10 @@ public class RubyDir extends RubyObject { | |
@JRubyMethod(name = "mkdir", required = 1, optional = 1, meta = true, compat = CompatVersion.RUBY1_8) | |
public static IRubyObject mkdir(IRubyObject recv, IRubyObject[] args) { | |
Ruby runtime = recv.getRuntime(); | |
- runtime.checkSafeString(args[0]); | |
+ RubyString stringArg = args[0].convertToString(); | |
+ runtime.checkSafeString(stringArg); | |
- String path = args[0].convertToString().getUnicodeValue(); | |
- | |
- return mkdirCommon(runtime, path, args); | |
+ return mkdirCommon(runtime, stringArg.getUnicodeValue(), args); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment