From: tietew@... Date: 2019-12-04T03:01:20+00:00 Subject: [ruby-core:96100] [Ruby master Bug#16382] SystemStackError thrown when running `LC_ALL="C" RUBYLIB=".:" ruby -E cp932:utf-8 aaa.rb` from where the current dir contains Japanese characters Issue #16382 has been updated by Tietew (Toru Iwase). same issue with 2.6.5 [x86_64-linux]. I think backport 2.6 is REQUIRED. ``` ~/tmp/���������$ echo "puts 'ok'" > aaa.rb ~/tmp/���������$ ruby -v ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux] ~/tmp/���������$ LC_ALL="C" RUBYLIB=".:" ruby -E cp932:utf-8 aaa.rb Traceback (most recent call last): 2: from :5:in `' 1: from /usr/local/anyenv/envs/rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' /usr/local/anyenv/envs/rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': stack level too deep (SystemStackError) ``` No need to set LC_ALL and encoding: ``` ~/tmp/���������$ echo $LANG ja_JP.UTF-8 ~/tmp/���������$ ruby aaa.rb ok ~/tmp/���������$ RUBYLIB="." ruby aaa.rb Traceback (most recent call last): 2: from :5:in `' 1: from /usr/local/anyenv/envs/rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' /usr/local/anyenv/envs/rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': stack level too deep (SystemStackError) ``` ---------------------------------------- Bug #16382: SystemStackError thrown when running `LC_ALL="C" RUBYLIB=".:" ruby -E cp932:utf-8 aaa.rb` from where the current dir contains Japanese characters https://bugs.ruby-lang.org/issues/16382#change-82960 * Author: yuki24 (Yuki Nishijima) * Status: Closed * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.7.0dev (2019-11-29T23:00:40Z master 0b1b2f2442) [x86_64-darwin18] * Backport: 2.5: REQUIRED, 2.6: DONTNEED ---------------------------------------- ## Steps to reproduce ``` ~/GitHub/ruby/did_you_mean/���������$ LC_ALL="C" RUBYLIB=".:" ruby -E cp932:utf-8 aaa.rb Traceback (most recent call last): 2: from :5:in `' 1: from /Users/yuki/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require' /Users/yuki/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require': stack level too deep (SystemStackError) ``` The key points are: * The current directory contains one or more Japanese character (perhaps non-alphabet char is what's causing the issue, but I'm unfamiliar with other types of chars) * Only happens when `LC_ALL="C" RUBYLIB=".:"` environment variables and the option `-E cp932:utf-8` are given * The existing of the file that is supposed to be run by the executable does not seem to matter ## Actual A `SystemStackError` is thrown. ## Expected The file specified should be run or Ruby should throw a `No such file or directory -- aaa.rb (LoadError)` error. -- https://bugs.ruby-lang.org/ Unsubscribe: