https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112017-10-12T04:54:18ZRuby Issue Tracking SystemRuby master - Feature #14007: open mode 'x' to raise error if file existshttps://redmine.ruby-lang.org/issues/14007?journal_id=671762017-10-12T04:54:18Zshevegen (Robert A. Heiler)shevegen@gmail.com
<ul></ul><p>Might be interesting. I have nothing against it but I guess matz and the ruby core team have to decide on whether it is sufficiently useful. In the case that it is approved, I hope that the documentation can be clear since ruby hackers need some explanation as to when/why to use the new parameter.</p>
<p>As for ArgumentError via 'rx' such as "mode: 'rx'" - if we ignore the reasoning given above, I think there is one reason that speaks against it at the least, which is backwards compatibility. Matz said a few times that he is reluctant to break backwards compatibility unless there is a very good reason, in the ruby 2.x branch. So the changed behaviour may be more fitting towards ruby 3.x, but to be honest, I would suggest to file a separate issue for the ArgumentError case and decouple it from your suggestion above about adding a new parameter. People may be more likely to adpopt new behaviour rather than be forced to change any existing code base, without it bringing them a lot of advantages (e. g. the ArgumentError case). I myself am neutral on it largely because it does not seem to be a big issue for me either way, I am fine with things as they are and I am also fine with things if they change (unless I may have missed something fundamental).</p> Ruby master - Feature #14007: open mode 'x' to raise error if file existshttps://redmine.ruby-lang.org/issues/14007?journal_id=671812017-10-12T05:21:23Znormalperson (Eric Wong)normalperson@yhbt.net
<ul></ul><p><a href="mailto:xkernigh@netscape.net" class="email">xkernigh@netscape.net</a> wrote:</p>
<blockquote>
<p>Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: open mode 'x' to raise error if file exists (Closed)" href="https://redmine.ruby-lang.org/issues/14007">#14007</a>: open mode 'x' to raise error if file exists<br>
<a href="https://bugs.ruby-lang.org/issues/14007" class="external">https://bugs.ruby-lang.org/issues/14007</a></p>
</blockquote>
<p>I like this, it's consistent with fopen in glibc and FreeBSD, at least<br>
and much easier to type than IO::EXCL.</p> Ruby master - Feature #14007: open mode 'x' to raise error if file existshttps://redmine.ruby-lang.org/issues/14007?journal_id=672002017-10-13T00:50:33Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul><li><strong>Is duplicate of</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/11258">Feature #11258</a>: add 'x' mode character for O_EXCL</i> added</li></ul> Ruby master - Feature #14007: open mode 'x' to raise error if file existshttps://redmine.ruby-lang.org/issues/14007?journal_id=672642017-10-16T02:43:50Zkernigh (George Koehler)xkernigh@netscape.net
<ul></ul><p>Sorry, I didn't know that feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: add 'x' mode character for O_EXCL (Closed)" href="https://redmine.ruby-lang.org/issues/11258">#11258</a> existed. I might have searched bugs.ruby-lang.org for "open mode" but not looked through the long list of results.</p> Ruby master - Feature #14007: open mode 'x' to raise error if file existshttps://redmine.ruby-lang.org/issues/14007?journal_id=734222018-08-09T08:49:14Zznz (Kazuhiro NISHIYAMA)
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Applied in changeset trunk|r64245.</p>
<hr>
<p>add 'x' mode character for O_EXCL</p>
<p>[Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: add 'x' mode character for O_EXCL (Closed)" href="https://redmine.ruby-lang.org/issues/11258">#11258</a>]<br>
Patch by cremno (cremno phobia)</p>