Skip to content

Commit

Permalink
Re-assign null so it can cast to RubyHash below.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Apr 21, 2015
1 parent 7d240aa commit ab3b1d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/main/java/org/jruby/RubyIO.java
Expand Up @@ -4102,12 +4102,14 @@ public static IRubyObject popen(ThreadContext context, IRubyObject recv, IRubyOb
int firstArg = 0;
int argc = args.length;

IRubyObject envHash = null;
IRubyObject envHash;

if (argc > 0 && !(envHash = TypeConverter.checkHashType(runtime, args[0])).isNil()) {
if (argc < 2) throw runtime.newArgumentError(1, 2);
firstArg++;
argc--;
} else {
envHash = null;
}

if (Platform.IS_WINDOWS) {
Expand Down

0 comments on commit ab3b1d5

Please sign in to comment.