Feature #6399 ignores valid open_args on Windows

Added by djberg96 (Daniel Berger) almost 6 years ago. Updated 3 months ago.

Target version:


On Microsoft Windows the fopen function accepts many more modes than the standard function:

However, Ruby 1.9 doesn't appear to allow them:

Try to force a sequential scan with 'S', for example, open_args: ['rbS']) # => invalid access mode rbS (ArgumentError)

It looks like checks are being made manually in file.c and if they don't match the predetermined flags then an error is raised. I would submit that the flags should be allowed to be passed through, and fopen should fail on its own if they're invalid.


#1 [ruby-core:44861] Updated by djberg96 (Daniel Berger) almost 6 years ago

Grr, should be "open_args".

#2 [ruby-core:44862] Updated by nobu (Nobuyoshi Nakada) almost 6 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from ignores valid command_args on Windows to ignores valid open_args on Windows

#3 [ruby-core:44863] Updated by nobu (Nobuyoshi Nakada) almost 6 years ago

Of course, you mean "valid on Windows", I guess.

#4 [ruby-core:44867] Updated by mame (Yusuke Endoh) almost 6 years ago

  • Status changed from Open to Assigned
  • Assignee set to usa (Usaku NAKAMURA)

#5 [ruby-core:44920] Updated by usa (Usaku NAKAMURA) almost 6 years ago

I do not think that Ruby must support such non standard modes.
But if you can provide a patch to support them in other platforms,
your request may get more persuasive.

#6 [ruby-core:48641] Updated by usa (Usaku NAKAMURA) over 5 years ago

  • Category set to core
  • Target version set to 2.6

#7 Updated by usa (Usaku NAKAMURA) 5 months ago

  • Status changed from Assigned to Feedback

#8 Updated by naruse (Yui NARUSE) 3 months ago

  • Target version deleted (2.6)

Also available in: Atom PDF