[#80974] [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit — ko1@...
Issue #13517 has been updated by ko1 (Koichi Sasada).
4 messages
2017/05/02
[#81024] Re: [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
— SASADA Koichi <ko1@...>
2017/05/07
sorry for late response.
[#80996] [Ruby trunk Feature#13544] Allow loading an ISeqs sequence directly from a C extension without requiring buffer is in an RVALUE — sam.saffron@...
Issue #13544 has been reported by sam.saffron (Sam Saffron).
3 messages
2017/05/04
[#81016] [Ruby trunk Bug#13526] Segmentation fault at 0x0055c2e58e8920 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux] — s.wanabe@...
Issue #13526 has been updated by wanabe (_ wanabe).
3 messages
2017/05/07
[#81048] Re: [ruby-cvs:65788] normal:r58614 (trunk): rb_execution_context_t: move stack, stack_size and cfp from rb_thread_t — SASADA Koichi <ko1@...>
It causes compile error on raspi 3.
3 messages
2017/05/09
[#81201] Re: [ruby-cvs:65935] normal:r58761 (trunk): test/test_extilibs.rb: do not check the existence of fiddle — "U.NAKAMURA" <usa@...>
Hi, Eric
4 messages
2017/05/16
[#81202] Re: [ruby-cvs:65935] normal:r58761 (trunk): test/test_extilibs.rb: do not check the existence of fiddle
— Eric Wong <normalperson@...>
2017/05/16
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[#81427] Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534) — SASADA Koichi <ko1@...>
Hi,
6 messages
2017/05/28
[#81428] Re: Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534)
— Eric Wong <normalperson@...>
2017/05/28
SASADA Koichi <ko1@atdot.net> wrote:
[ruby-core:81218] [Ruby trunk Bug#13571] Script arguments, encoding, windows / MinGW
From:
Greg.mpls@...
Date:
2017-05-17 21:10:37 UTC
List:
ruby-core #81218
Issue #13571 has been reported by MSP-Greg (Greg L).
----------------------------------------
Bug #13571: Script arguments, encoding, windows / MinGW
https://bugs.ruby-lang.org/issues/13571
* Author: MSP-Greg (Greg L)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.5.0dev (2017-05-17 trunk 58774) [x64-mingw32]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
The following is windows/MinGW specific.
I have been patching around a failure in [TestRubyOptions#test_command_line_progname_nonascii](https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L742-L758) for a while, and decided to investigate further, assuming it was a simple issue.
The following code -
```ruby
# set dir to valid directory
dir = "E:/temp"
fn_1 = 'äÖü.rb'
fn_2 = 'テスト.rb'
puts
puts "ENV['RUBYOPT'] #{ENV['RUBYOPT']}" \
"\nfilesystem #{Encoding.find('filesystem')}" \
"\nexternal #{Encoding.default_external}" \
"\n`chcp` #{`chcp`}" \
"locale #{Encoding.find('locale')}" \
"\n__ENCODING__ #{__ENCODING__}" \
"\ninternal #{Encoding.default_internal}\n" \
"\nfn_1 #{fn_1.encoding.to_s}" \
"\näÖü.rb #{'äÖü.rb'.encoding.to_s}" \
"\nfn_2 #{fn_2.encoding.to_s}" \
"\nテスト.rb #{'テスト.rb'.encoding.to_s}"
Dir.chdir(dir) do |dir|
open(fn_1, "w") { |f| f.puts "puts File.basename($0)" }
open(fn_2, "w") { |f| f.puts "puts File.basename($0)" }
puts
puts "File.exist?(fn_1) #{File.exist?(fn_1)}"
puts "File.exist?(fn_2) #{File.exist?(fn_2)}"
puts
puts `ruby #{fn_1}`
puts `ruby #{fn_2}`
end
```
produces the following output -
```
ENV['RUBYOPT']
filesystem Windows-1252
external IBM437
`chcp` Active code page: 437
locale IBM437
__ENCODING__ UTF-8
internal
fn_1 UTF-8
äÖü.rb UTF-8
fn_2 UTF-8
テスト.rb UTF-8
File.exist?(fn_1) true
File.exist?(fn_2) true
äÖü.rb: No such file or directory @ realpath_rec - E:/temp/„™�.rb (Errno::ENOENT)
ruby: Invalid argument -- ???.rb (LoadError)
```
Of note is that both files are created (and appear correctly in Explorer), but neither can be used as a script argument.
Copy and pasting the names (from Explorer) on the command line produces the following similar output -
```
E:\temp>ruby äÖü.rb
äÖü.rb: No such file or directory @ realpath_rec - E:/temp/„™�.rb (Errno::ENOENT)
E:\temp>ruby テスト.rb
ruby: Invalid argument -- ???.rb (LoadError)
```
Lastly, if before running the code I do a `chcp 1252` command to match up 'locale' and 'filesystem', the first script file runs and produces the correct output.
Hence, it appears that some (or all?) `File` methods deal properly with `filesystem` encoding, but ruby script arguments are not correctly encoded.
--
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>