Skip to content

Commit e22d1da

Browse files
committed
Allow File.open and File.new with 4 arguments
The methods now support filename, mode, permissions and options as separate parameters.
1 parent d507e49 commit e22d1da

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

core/src/main/java/org/jruby/RubyFile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ public IRubyObject flock(ThreadContext context, IRubyObject operation) {
321321
}
322322

323323
// rb_file_initialize
324-
@JRubyMethod(name = "initialize", required = 1, optional = 2, visibility = PRIVATE)
324+
@JRubyMethod(name = "initialize", required = 1, optional = 3, visibility = PRIVATE)
325325
public IRubyObject initialize(ThreadContext context, IRubyObject[] args, Block block) {
326326
if (openFile != null) {
327327
throw context.runtime.newRuntimeError("reinitializing File");

test/mri/excludes/TestPathname.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
exclude :test_find, "fails to EACCES an unreadable path, root cause of test_find.rb's test_unreadable_dir failure?"
22
exclude :test_lchmod, "fails on Travis, maybe on Linux in general?"
3-
exclude :test_open, "4-args open()"
43
exclude :test_realdirpath, "bad symlink resolution"
54
exclude :test_realpath, "needs investigation"
65
exclude :test_relative_path_from_casefold, "path encoding problems"

0 commit comments

Comments
 (0)