[#104169] [Ruby master Feature#17938] Keyword alternative for boolean positional arguments — matheusrichardt@...

Issue #17938 has been reported by matheusrich (Matheus Richard).

12 messages 2021/06/04

[#104213] [Ruby master Feature#17942] Add a `initialize(public @a, private @b)` shortcut syntax for defining public/private accessors for instance vars — tyler@...

Issue #17942 has been reported by TylerRick (Tyler Rick).

6 messages 2021/06/09

[#104288] [Ruby master Bug#17992] Upstreaming the htmlentities gem into CGI#.(un)escape_html — alexandermomchilov@...

Issue #17992 has been reported by AMomchilov (Alexander Momchilov).

9 messages 2021/06/15

[#104338] [Ruby master Misc#17997] DevelopersMeeting20210715Japan — mame@...

Issue #17997 has been reported by mame (Yusuke Endoh).

10 messages 2021/06/17

[#104361] [Ruby master Bug#18000] have_library doesn't work when ruby is compiled with --disable-shared --disable-install-static-library — jean.boussier@...

Issue #18000 has been reported by byroot (Jean Boussier).

9 messages 2021/06/18

[#104401] [Ruby master Feature#18007] Help developers of C extensions meet requirements in "doc/extension.rdoc" — mike.dalessio@...

Issue #18007 has been reported by mdalessio (Mike Dalessio).

16 messages 2021/06/25

[#104430] [Ruby master Bug#18011] `Method#parameters` is incorrect for forwarded arguments — josh.cheek@...

Issue #18011 has been reported by josh.cheek (Josh Cheek).

12 messages 2021/06/29

[ruby-core:104296] [Ruby master Bug#15621] system({}, ...) breaks nonascii ENV["PATH"] on Windows

From: merch-redmine@...
Date: 2021-06-16 00:27:31 UTC
List: ruby-core #104296
Issue #15621 has been updated by jeremyevans0 (Jeremy Evans).

Status changed from Open to Closed

Starting in Ruby 3.0, it appears `ENV["PATH"]` is unmodified after the call to `system`.  In prior versions of Ruby, it was modified by the call to `system`.  This is probably related to the changes to `ENV` in Ruby 3.0, which will not be backported to earlier Ruby versions.

----------------------------------------
Bug #15621: system({}, ...) breaks nonascii ENV["PATH"] on Windows
https://bugs.ruby-lang.org/issues/15621#change-92517

* Author: kenhys (Kentaro Hayashi)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 2.6.1p33 (2019-01-30 revision 66950) [x64-mingw32]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------

### Problem

It seems that `system({}, ...)` breaks nonascii `ENV["PATH"]` after execution.
`system(...)` isn't affected. Only `system(env, ...)` is affected.

OS: Windows 7
Ruby: https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.1-1/rubyinstaller-2.6.1-1-x64.exe
chcp: 現在のコード ページ: 932

### Expected

`system({}, ...)` doesn't break nonascii `ENV["PATH"]` environment variable after execution.

### Actual

Here is the sample code to reproduce this issue.

```
cat break-env-system.rb
# coding: cp932
ENV["PATH"] = [
  "インストール",
  ENV["PATH"],
].join(File::PATH_SEPARATOR)

env = {}
p ENV["PATH"]
system(env, "echo")
p ENV["PATH"]
```

It produces the following output:

```
"インストール;%SystemRoot%\\system32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files\\CMake\\bin;C:\\GnuWin32\\bin;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\patch-2.5.9-7-bin\\bin;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Ruby26-x64\\bin"
ECHO は <ON> です。
"?C???X?g?[??;%SystemRoot%\\system32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files\\CMake\\bin;C:\\GnuWin32\\bin;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\patch-2.5.9-7-bin\\bin;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Ruby26-x64\\bin"
```

If `system("echo")` is used instead of `system({}, "echo")`, `ENV["PATH"]` is not broken.


---Files--------------------------------
break-env-system.rb (163 Bytes)


-- 
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>

In This Thread

Prev Next