[#99856] [Ruby master Feature#17143] Improve support for warning categories — merch-redmine@...

Issue #17143 has been reported by jeremyevans0 (Jeremy Evans).

16 messages 2020/09/03

[#99868] [Ruby master Bug#17144] Tempfile.open { ... } does not unlink the file — eregontp@...

Issue #17144 has been reported by Eregon (Benoit Daloze).

15 messages 2020/09/03

[#99885] [Ruby master Feature#17145] Ractor-aware `Object#deep_freeze` — marcandre-ruby-core@...

Issue #17145 has been reported by marcandre (Marc-Andre Lafortune).

32 messages 2020/09/03

[#99903] [Ruby master Bug#17146] Queue operations are allowed after it is frozen — eregontp@...

Issue #17146 has been reported by Eregon (Benoit Daloze).

16 messages 2020/09/03

[#100016] [Ruby master Feature#17171] Why is the visibility of constants not affected by `private`? — marcandre-ruby-core@...

Issue #17171 has been reported by marcandre (Marc-Andre Lafortune).

10 messages 2020/09/15

[#100024] [Ruby master Bug#17175] Ruby 2.5: OpenSSL related test failures — jaruga@...

Issue #17175 has been reported by jaruga (Jun Aruga).

10 messages 2020/09/16

[#100025] [Ruby master Feature#17176] GC.enable_autocompact / GC.disable_autocompact — tenderlove@...

Issue #17176 has been reported by tenderlovemaking (Aaron Patterson).

11 messages 2020/09/16

[#100099] [Ruby master Bug#17184] No stdlib function to perform simple string replacement — sheerun@...

Issue #17184 has been reported by sheerun (Adam Stankiewicz).

18 messages 2020/09/24

[#100192] [Ruby master Bug#17197] Some Hash methods still have arity 2 instead of 1 — marcandre-ruby-core@...

Issue #17197 has been reported by marcandre (Marc-Andre Lafortune).

14 messages 2020/09/28

[#100200] [Ruby master Misc#17199] id outputed by inspect and to_s output does not allow to find actual object_id and vice-versa — baptiste.courtois@...

Issue #17199 has been reported by Annih (Baptiste Courtois).

7 messages 2020/09/28

[#100206] [Ruby master Misc#17200] DevelopersMeeting20201026Japan — mame@...

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

18 messages 2020/09/28

[#100239] [Ruby master Feature#17206] Introduce new Regexp option to avoid MatchData allocation — fatkodima123@...

Issue #17206 has been reported by fatkodima (Dima Fatko).

8 messages 2020/09/30

[ruby-core:100214] [Ruby master Bug#15993] 'require' doesn't work if there are Cyrillic chars in the path to Ruby dir

From: tschoening@...
Date: 2020-09-29 14:04:08 UTC
List: ruby-core #100214
Issue #15993 has been updated by tschoening (Thorsten Schテカning).


I think I have a similar problem originally reported at GitHub already: 

https://github.com/rubygems/rubygems/issues/3853

I have a Ruby-based shell application which needs to require a library during startup. I'm using the following command line:

``` shell
"..\ruby\bin\ruby.exe" "-I../runtime/lib" "../visualizer/bin/ksv" "--require=de/[...]/par_opp_dispatcher.rb" "--opaque-types=true" "../files_to_show/recs_clt.bin" "de/[...]/par_recs_clt.rb"
```

This results in the following error, while the first line describes the current directory I'm in. It contains some German umlaut `テシ`. Using an ASCII-only path, things work as expected.

``` shell
C:\[...]\Mテシller electronic\[...]\ks_ruby_visualizer>show.cmd
Traceback (most recent call last):
        1: from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
<internal:gem_prelude>:2:in `require': No such file or directory -- C:/[...]/Mテδシller electronic/[...]/rubygems.rb (LoadError)
```

The problem seems to be that at some point Ruby really seems to forward UTF-8 encoded bytes into the file system and such a path simply doesn't exist. The interesting thing is that many times before the path is forwarded correctly according to the following ProcMon-log:

``` shell
18:57:48,7938985	ruby.exe	15296	CreateFile	C:\[...]\Mテシller electronic\[...]\rubygems.rb	SUCCESS	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
18:57:48,7940217	ruby.exe	15296	QueryBasicInformationFile	C:\[...]\Mテシller electronic\[...]\rubygems.rb	SUCCESS	CreationTime: 24.07.2020 14:48:44, LastAccessTime: 24.07.2020 14:48:44, LastWriteTime: 01.10.2019 23:01:05, ChangeTime: 04.02.2020 22:30:28, FileAttributes: A 0x80000
18:57:48,7940500	ruby.exe	15296	CloseFile	C:\[...]\Mテシller electronic\[...]\rubygems.rb	SUCCESS	
18:57:48,7942644	ruby.exe	15296	CreateFile	C:\[...]\Mテシller electronic\[...]\rubygems.rb	SUCCESS	Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened
18:57:48,7943188	ruby.exe	15296	CloseFile	C:\[...]\Mテシller electronic\[...]\rubygems.rb	SUCCESS	
18:57:48,7945545	ruby.exe	15296	CreateFile	C:\[...]\Mテδシller electronic\[...]\rubygems.rb	PATH NOT FOUND	Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a
```

![Clipboard01](https://user-images.githubusercontent.com/6223655/88416199-13655d80-cde0-11ea-9b0d-2319b6c3af2b.png)

Here are my current environment details:

``` shell
$ gem env version
3.0.3
```

* Windows 10 1909 x86-64
* default codepages Windows-1252 and CP-850
* Ruby 2.6.5


----------------------------------------
Bug #15993: 'require' doesn't work if there are Cyrillic chars in the path to Ruby dir
https://bugs.ruby-lang.org/issues/15993#change-87804

* Author: inversion (Yura Babak)
* Status: Open
* Priority: Normal
* ruby -v: ruby 2.6.3p62 (2019-04-16 revision 67580) [x64-mingw32]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
I窶冦 trying to build a cross-platform portable application with Ruby onboard and there is a problem on Windows. 
A user usually installs it to the Roaming folder which sits inside a user folder which can often have not a Latin name or contain spaces). 
When there is a Cyrillic character (maybe just not Latin) in the path 窶require of any gem doesn’t work:

```
D:\users\киї\Ruby\2.6\bin>ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [x64-mingw32]

D:\users\киї\Ruby\2.6\bin>ruby -e "require 'logger'"
Traceback (most recent call last):
        1: from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
<internal:gem_prelude>:2:in `require': No such file or directory -- D:/users/РєРёС—/Ruby/2.6/lib/ruby/2.6.0/rubygems.rb (LoadError)

D:\users\киї\Ruby\2.6\bin>ruby --disable=rubyopt -e "require 'logger'"
Traceback (most recent call last):
        1: from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
<internal:gem_prelude>:2:in `require': No such file or directory -- D:/users/РєРёС—/Ruby/2.6/lib/ruby/2.6.0/rubygems.rb (LoadError)

D:\users\киї\Ruby\2.6\bin>gem list
Traceback (most recent call last):
        1: from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
<internal:gem_prelude>:2:in `require': No such file or directory -- D:/users/РєРёС—/Ruby/2.6/lib/ruby/2.6.0/rubygems.rb (LoadError)

```

We can see such encoding transformations in the output:

```
киї (utf-8) == РєРёС— (win1251)
```

I have an old Ruby installation that works fine:

```
D:\users\киї\Ruby\2.0\bin>ruby -e "require 'logger'"

D:\users\киї\Ruby\2.0\bin>ruby -v
ruby 2.0.0p451 (2014-02-24) [i386-mingw32]
```
The same is for `ruby 2.0.0p643 (2015-02-25) [i386-mingw32]` .

I also checked that require fails in the same case for
`ruby 2.1.9p490 (2016-03-30 revision 54437) [i386-mingw32]`



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