[#81999] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — ko1@...
Issue #13737 has been updated by ko1 (Koichi Sasada).
4 messages
2017/07/11
[#82005] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — nobu@...
Issue #13737 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/07/12
[#82102] Re: register_fstring_tainted:FL_TEST_RAW(str, RSTRING_FSTR) — Eric Wong <normalperson@...>
Koichi Sasada <ko1@atdot.net> wrote:
4 messages
2017/07/18
[#82151] [Ruby trunk Feature#13637] [PATCH] tool/runruby.rb: test with smallest possible machine stack — Rei.Odaira@...
Issue #13637 has been updated by ReiOdaira (Rei Odaira).
3 messages
2017/07/24
[ruby-core:82030] [Ruby trunk Feature#13696] Add exchange and noreplace options to File.rename
From:
glass.saga@...
Date:
2017-07-13 11:01:17 UTC
List:
ruby-core #82030
Issue #13696 has been updated by Glass_saga (Masaki Matsushita).
I think atomicity is important. If the kernel doesn't support atomic exchange, File.exchange should raise NotImplementedError and users can handle it properly.
```
begin
File.exchange("hoge", "fuga")
rescue NotImplementedError
# exchange files in another way
end
```
----------------------------------------
Feature #13696: Add exchange and noreplace options to File.rename
https://bugs.ruby-lang.org/issues/13696#change-65758
* Author: Glass_saga (Masaki Matsushita)
* Status: Open
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 2.5
----------------------------------------
renameat2(2) introduced in linux kernel 3.15 takes following flags.
```
RENAME_EXCHANGE: Atomically exchange oldpath and newpath.
RENAME_NOREPLACE: Don't overwrite newpath of the rename. Return an error if newpath already exists.
```
This change makes `File.rename` take these flags as keyword arguments.
Example:
```ruby
File.write("hoge", "hoge")
File.write("fuga", "fuga")
File.rename("hoge", "fuga", exchange: true) # atomically exchanged
File.read("fuga") #=> "hoge"
File.rename("hoge", "fuga", noreplace: true) #=> File exists @ syserr_fail2_in - fuga (Errno::EEXIST)
```
---Files--------------------------------
patch.diff (4.19 KB)
patch.diff (4.84 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>