Ruby Issue Tracking System: Issues
https://bugs.ruby-lang.org/
https://bugs.ruby-lang.org/favicon.ico?1711330511
2023-12-12T02:17:12Z
Ruby Issue Tracking System
Redmine
Ruby master - Bug #20061 (Closed): test_free_on_exit_env_var failed with some cppflags
https://bugs.ruby-lang.org/issues/20061
2023-12-12T02:17:12Z
znz (Kazuhiro NISHIYAMA)
<p>I use following <code>cppflags</code>, and <code>TestRubyOptions#test_free_on_exit_env_var</code> failed.</p>
<pre><code>../configure 'cppflags=-DUSE_RVARGC -DRUBY_DEBUG -DVM_CHECK_MODE=1 -DTRANSIENT_HEAP_CHECK_MODE -DRGENGC_CHECK_MODE -DENC_DEBUG -DUSE_RUBY_DEBUG_LOG=1' --prefix=$(rbenv root)/versions/master --with-baseruby=/usr/bin/ruby --disable-install-doc
</code></pre>
<p>It can reproduce using <code>miniruby</code>.</p>
<pre><code>$ env RUBY_FREE_ON_EXIT=1 ./miniruby -e 0
./miniruby: warning: Free on exit is experimental and may be unstable
-e: [BUG] obj_free: RVALUE_MARKED(0x00007efe26a69010 [3LM ] T_CLASS (anon)) != FALSE
ruby 3.3.0dev (2023-12-12T01:31:37Z master 73b43fffa1) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0003 E:0006b0 DUMMY [FINISH]
-- Threading information ---------------------------------------------------
Total ractor count: 1
Ruby thread count for this ractor: 1
-- C level backtrace information -------------------------------------------
/home/ubuntu/ruby/build/miniruby(rb_print_backtrace+0x14) [0x5563381d66a7] ../vm_dump.c:820
/home/ubuntu/ruby/build/miniruby(rb_vm_bugreport) ../vm_dump.c:1151
/home/ubuntu/ruby/build/miniruby(bug_report_end+0x0) [0x556337fc41ad] ../error.c:1042
/home/ubuntu/ruby/build/miniruby(rb_bug_without_die) ../error.c:1042
/home/ubuntu/ruby/build/miniruby(die+0x0) [0x556337eef35b] ../error.c:1050
/home/ubuntu/ruby/build/miniruby(rb_bug) ../error.c:1052
/home/ubuntu/ruby/build/miniruby(obj_free+0x6db) [0x556337fed3fb] ../gc.c:3551
/home/ubuntu/ruby/build/miniruby(rb_objspace_call_finalizer+0x3bb) [0x556337fed8db] ../gc.c:4692
/home/ubuntu/ruby/build/miniruby(rb_ec_finalize+0x2a) [0x556337fccf80] ../eval.c:168
/home/ubuntu/ruby/build/miniruby(rb_ec_cleanup) ../eval.c:260
/home/ubuntu/ruby/build/miniruby(ruby_run_node+0x6e) [0x556337fcf58e] ../eval.c:328
/home/ubuntu/ruby/build/miniruby(rb_main+0x21) [0x556337f0ff0b] ../main.c:39
/home/ubuntu/ruby/build/miniruby(main) ../main.c:58
/lib/x86_64-linux-gnu/libc.so.6(0x7efe2a5bad90) [0x7efe2a5bad90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7efe2a5bae40]
[0x556337f0ff55]
-- Other runtime information -----------------------------------------------
* Process memory map:
556337ea6000-556337ee9000 r--p 00000000 00:39 4234136 /home/ubuntu/ruby/build/miniruby
556337ee9000-5563382fc000 r-xp 00043000 00:39 4234136 /home/ubuntu/ruby/build/miniruby
5563382fc000-5563384aa000 r--p 00456000 00:39 4234136 /home/ubuntu/ruby/build/miniruby
5563384aa000-5563384c1000 r--p 00603000 00:39 4234136 /home/ubuntu/ruby/build/miniruby
5563384c1000-5563384c2000 rw-p 0061a000 00:39 4234136 /home/ubuntu/ruby/build/miniruby
5563384c2000-5563384d8000 rw-p 00000000 00:00 0
55633a3d2000-55633a6dd000 rw-p 00000000 00:00 0 [heap]
7efe23be1000-7efe26710000 r--s 00000000 00:39 4234136 /home/ubuntu/ruby/build/miniruby
7efe26710000-7efe26720000 rw-p 00000000 00:00 0
7efe26812000-7efe26a30000 r--s 00000000 00:39 4191832 /usr/lib/x86_64-linux-gnu/libc.so.6
7efe26a30000-7efe26ad0000 rw-p 00000000 00:00 0
7efe26ad0000-7efe26ad1000 ---p 00000000 00:00 0
7efe26ad1000-7efe26b72000 rw-p 00000000 00:00 0
7efe26b72000-7efe26b73000 ---p 00000000 00:00 0
7efe26b73000-7efe26c14000 rw-p 00000000 00:00 0
7efe26c14000-7efe26c15000 ---p 00000000 00:00 0
7efe26c15000-7efe26cb6000 rw-p 00000000 00:00 0
7efe26cb6000-7efe26cb7000 ---p 00000000 00:00 0
7efe26cb7000-7efe26d58000 rw-p 00000000 00:00 0
7efe26d58000-7efe26d59000 ---p 00000000 00:00 0
7efe26d59000-7efe26dfa000 rw-p 00000000 00:00 0
7efe26dfa000-7efe26dfb000 ---p 00000000 00:00 0
7efe26dfb000-7efe26e9c000 rw-p 00000000 00:00 0
7efe26e9c000-7efe26e9d000 ---p 00000000 00:00 0
7efe26e9d000-7efe26f3e000 rw-p 00000000 00:00 0
7efe26f3e000-7efe26f3f000 ---p 00000000 00:00 0
7efe26f3f000-7efe26fe0000 rw-p 00000000 00:00 0
7efe26fe0000-7efe26fe1000 ---p 00000000 00:00 0
7efe26fe1000-7efe27082000 rw-p 00000000 00:00 0
7efe27082000-7efe27083000 ---p 00000000 00:00 0
7efe27083000-7efe27124000 rw-p 00000000 00:00 0
7efe27124000-7efe27125000 ---p 00000000 00:00 0
7efe27125000-7efe271c6000 rw-p 00000000 00:00 0
7efe271c6000-7efe271c7000 ---p 00000000 00:00 0
7efe271c7000-7efe27268000 rw-p 00000000 00:00 0
7efe27268000-7efe27269000 ---p 00000000 00:00 0
7efe27269000-7efe2730a000 rw-p 00000000 00:00 0
7efe2730a000-7efe2730b000 ---p 00000000 00:00 0
7efe2730b000-7efe273ac000 rw-p 00000000 00:00 0
7efe273ac000-7efe273ad000 ---p 00000000 00:00 0
7efe273ad000-7efe2744e000 rw-p 00000000 00:00 0
7efe2744e000-7efe2744f000 ---p 00000000 00:00 0
7efe2744f000-7efe274f0000 rw-p 00000000 00:00 0
7efe274f0000-7efe274f1000 ---p 00000000 00:00 0
7efe274f1000-7efe27592000 rw-p 00000000 00:00 0
7efe27592000-7efe27593000 ---p 00000000 00:00 0
7efe27593000-7efe27634000 rw-p 00000000 00:00 0
7efe27634000-7efe27635000 ---p 00000000 00:00 0
7efe27635000-7efe276d6000 rw-p 00000000 00:00 0
7efe276d6000-7efe276d7000 ---p 00000000 00:00 0
7efe276d7000-7efe27778000 rw-p 00000000 00:00 0
7efe27778000-7efe27779000 ---p 00000000 00:00 0
7efe27779000-7efe2781a000 rw-p 00000000 00:00 0
7efe2781a000-7efe2781b000 ---p 00000000 00:00 0
7efe2781b000-7efe278bc000 rw-p 00000000 00:00 0
7efe278bc000-7efe278bd000 ---p 00000000 00:00 0
7efe278bd000-7efe2795e000 rw-p 00000000 00:00 0
7efe2795e000-7efe2795f000 ---p 00000000 00:00 0
7efe2795f000-7efe27a00000 rw-p 00000000 00:00 0
7efe27a00000-7efe27a01000 ---p 00000000 00:00 0
7efe27a01000-7efe27aa2000 rw-p 00000000 00:00 0
7efe27aa2000-7efe27aa3000 ---p 00000000 00:00 0
7efe27aa3000-7efe27b44000 rw-p 00000000 00:00 0
7efe27b44000-7efe27b45000 ---p 00000000 00:00 0
7efe27b45000-7efe27be6000 rw-p 00000000 00:00 0
7efe27be6000-7efe27be7000 ---p 00000000 00:00 0
7efe27be7000-7efe27c88000 rw-p 00000000 00:00 0
7efe27c88000-7efe27c89000 ---p 00000000 00:00 0
7efe27c89000-7efe27d2a000 rw-p 00000000 00:00 0
7efe27d2a000-7efe27d2b000 ---p 00000000 00:00 0
7efe27d2b000-7efe27dcc000 rw-p 00000000 00:00 0
7efe27dcc000-7efe27dcd000 ---p 00000000 00:00 0
7efe27dcd000-7efe27e6e000 rw-p 00000000 00:00 0
7efe27e6e000-7efe27e6f000 ---p 00000000 00:00 0
7efe27e6f000-7efe27f20000 rw-p 00000000 00:00 0
7efe27f2f000-7efe27f30000 ---p 00000000 00:00 0
7efe27f30000-7efe28780000 rw-p 00000000 00:00 0
7efe2878f000-7efe2a140000 rw-p 00000000 00:00 0
7efe2a144000-7efe2a245000 rw-p 00000000 00:00 0
7efe2a245000-7efe2a24c000 r--s 00000000 00:39 4192098 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
7efe2a24c000-7efe2a2a3000 r--p 00000000 00:39 4193355 /usr/lib/locale/C.utf8/LC_CTYPE
7efe2a2a3000-7efe2a58c000 r--p 00000000 00:39 4192959 /usr/lib/locale/locale-archive
7efe2a58c000-7efe2a591000 rw-p 00000000 00:00 0
7efe2a591000-7efe2a5b9000 r--p 00000000 00:39 4191832 /usr/lib/x86_64-linux-gnu/libc.so.6
7efe2a5b9000-7efe2a74e000 r-xp 00028000 00:39 4191832 /usr/lib/x86_64-linux-gnu/libc.so.6
7efe2a74e000-7efe2a7a6000 r--p 001bd000 00:39 4191832 /usr/lib/x86_64-linux-gnu/libc.so.6
7efe2a7a6000-7efe2a7aa000 r--p 00214000 00:39 4191832 /usr/lib/x86_64-linux-gnu/libc.so.6
7efe2a7aa000-7efe2a7ac000 rw-p 00218000 00:39 4191832 /usr/lib/x86_64-linux-gnu/libc.so.6
7efe2a7ac000-7efe2a7b9000 rw-p 00000000 00:00 0
7efe2a7b9000-7efe2a7bc000 r--p 00000000 00:39 3583519 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
7efe2a7bc000-7efe2a7d3000 r-xp 00003000 00:39 3583519 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
7efe2a7d3000-7efe2a7d7000 r--p 0001a000 00:39 3583519 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
7efe2a7d7000-7efe2a7d8000 r--p 0001d000 00:39 3583519 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
7efe2a7d8000-7efe2a7d9000 rw-p 0001e000 00:39 3583519 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
7efe2a7d9000-7efe2a7e7000 r--p 00000000 00:39 4191835 /usr/lib/x86_64-linux-gnu/libm.so.6
7efe2a7e7000-7efe2a863000 r-xp 0000e000 00:39 4191835 /usr/lib/x86_64-linux-gnu/libm.so.6
7efe2a863000-7efe2a8be000 r--p 0008a000 00:39 4191835 /usr/lib/x86_64-linux-gnu/libm.so.6
7efe2a8be000-7efe2a8bf000 r--p 000e4000 00:39 4191835 /usr/lib/x86_64-linux-gnu/libm.so.6
7efe2a8bf000-7efe2a8c0000 rw-p 000e5000 00:39 4191835 /usr/lib/x86_64-linux-gnu/libm.so.6
7efe2a8c0000-7efe2a8c2000 r--p 00000000 00:39 12895 /usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7efe2a8c2000-7efe2a8d6000 r-xp 00002000 00:39 12895 /usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7efe2a8d6000-7efe2a8ef000 r--p 00016000 00:39 12895 /usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7efe2a8ef000-7efe2a8f0000 ---p 0002f000 00:39 12895 /usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7efe2a8f0000-7efe2a8f1000 r--p 0002f000 00:39 12895 /usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7efe2a8f1000-7efe2a8f2000 rw-p 00030000 00:39 12895 /usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7efe2a8f2000-7efe2a8fa000 rw-p 00000000 00:00 0
7efe2a8fa000-7efe2a904000 r--p 00000000 00:39 13002 /usr/lib/x86_64-linux-gnu/libgmp.so.10.4.1
7efe2a904000-7efe2a963000 r-xp 0000a000 00:39 13002 /usr/lib/x86_64-linux-gnu/libgmp.so.10.4.1
7efe2a963000-7efe2a97a000 r--p 00069000 00:39 13002 /usr/lib/x86_64-linux-gnu/libgmp.so.10.4.1
7efe2a97a000-7efe2a97b000 r--p 0007f000 00:39 13002 /usr/lib/x86_64-linux-gnu/libgmp.so.10.4.1
7efe2a97b000-7efe2a97c000 rw-p 00080000 00:39 13002 /usr/lib/x86_64-linux-gnu/libgmp.so.10.4.1
7efe2a97c000-7efe2a97e000 r--p 00000000 00:39 13365 /usr/lib/x86_64-linux-gnu/libz.so.1.2.11
7efe2a97e000-7efe2a98f000 r-xp 00002000 00:39 13365 /usr/lib/x86_64-linux-gnu/libz.so.1.2.11
7efe2a98f000-7efe2a995000 r--p 00013000 00:39 13365 /usr/lib/x86_64-linux-gnu/libz.so.1.2.11
7efe2a995000-7efe2a996000 ---p 00019000 00:39 13365 /usr/lib/x86_64-linux-gnu/libz.so.1.2.11
7efe2a996000-7efe2a997000 r--p 00019000 00:39 13365 /usr/lib/x86_64-linux-gnu/libz.so.1.2.11
7efe2a997000-7efe2a998000 rw-p 0001a000 00:39 13365 /usr/lib/x86_64-linux-gnu/libz.so.1.2.11
7efe2a99e000-7efe2a9a0000 rw-p 00000000 00:00 0
7efe2a9a0000-7efe2a9a2000 r--p 00000000 00:39 4191829 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
7efe2a9a2000-7efe2a9cc000 r-xp 00002000 00:39 4191829 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
7efe2a9cc000-7efe2a9d7000 r--p 0002c000 00:39 4191829 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
7efe2a9d8000-7efe2a9da000 r--p 00037000 00:39 4191829 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
7efe2a9da000-7efe2a9dc000 rw-p 00039000 00:39 4191829 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
7ffdc11f0000-7ffdc19ef000 rw-p 00000000 00:00 0 [stack]
7ffdc19f7000-7ffdc19fb000 r--p 00000000 00:00 0 [vvar]
7ffdc19fb000-7ffdc19fd000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0 [vsyscall]
Aborted (core dumped)
</code></pre>
Ruby master - Bug #19902 (Closed): strftimeの返り値のascii_only?が間違っていることがある
https://bugs.ruby-lang.org/issues/19902
2023-09-26T00:33:29Z
znz (Kazuhiro NISHIYAMA)
<p>ruby-jp slack で tompng さんの調査によると以下のように <code>Regexp.esacpe</code> が変になる原因は <code>t.ascii_only? #=> true</code> になっていることでした。</p>
<pre><code>irb(main):053> t = Time.now.strftime(u='あ')
=> "あ"
irb(main):054> t==u
=> true
irb(main):055> t.encoding==u.encoding
=> true
irb(main):056> Regexp.escape(t)
=> "\xE3\x81\x82"
irb(main):057> Regexp.escape(u)
=> "あ"
</code></pre>
<p>git bisect で <code>make miniruby && ./miniruby -ve "p Time.now.strftime('%Y年').ascii_only?"</code> をしつつ調べてみると、<a href="https://github.com/ruby/ruby/commit/f34280ec6b684eeb21ef3336c7002e1a83dcfd2c" class="external">https://github.com/ruby/ruby/commit/f34280ec6b684eeb21ef3336c7002e1a83dcfd2c</a> から <code>true</code> になってしまっているようです。</p>
Ruby master - Bug #19605 (Closed): Please backport "Update how to subscribe mailing lists"
https://bugs.ruby-lang.org/issues/19605
2023-04-18T01:48:44Z
znz (Kazuhiro NISHIYAMA)
<p>I think how to subscribe should update.<br>
Because sending mail to <code>ruby-dev-request@ruby-lang.org</code> causes <code>Address not found</code>.</p>
<p><a href="https://github.com/ruby/ruby/commit/8519d94d3d8511080d3724fd328926d443cb95fa" class="external">https://github.com/ruby/ruby/commit/8519d94d3d8511080d3724fd328926d443cb95fa</a></p>
Ruby master - Bug #18906 (Closed): coverage failed on GItHub Actions
https://bugs.ruby-lang.org/issues/18906
2022-07-11T02:37:51Z
znz (Kazuhiro NISHIYAMA)
<p>coverage failed on GItHub Actions since <a href="https://github.com/ruby/actions/actions/runs/2486933939" class="external">https://github.com/ruby/actions/actions/runs/2486933939</a><br>
(previous <a href="https://github.com/ruby/actions/actions/runs/2486176425" class="external">https://github.com/ruby/actions/actions/runs/2486176425</a> is passed)</p>
<p>A reproduce test is attached.</p>
<pre><code> 1) Failure:
TestCoverage#test_coverage_ensure_if_return [/home/user/ruby/test/coverage/test_coverage.rb:193]:
pid 45865 exit 1
| /tmp/d20220710-45855-exgg7s/test.rb:5:in `flush': no implicit conversion of false into Integer (TypeError)
| from /tmp/d20220710-45855-exgg7s/test.rb:8:in `<top (required)>'
| from -:3:in `require'
| from -:3:in `<main>'
</code></pre>
Ruby master - Bug #18892 (Closed): ARGF.lineno starts from 2 when the file has shebang
https://bugs.ruby-lang.org/issues/18892
2022-07-02T06:11:07Z
znz (Kazuhiro NISHIYAMA)
<p>Since ruby 3.0, <code>ARGF.lineno</code> starts from 2 if the file has shebang.</p>
<p>Following example has <code>#!/usr/bin/env ruby</code>, and it can reproduce with the file has <code>#!</code> only.</p>
<pre><code>$ cat f.rb
#!/usr/bin/env ruby
ARGF.each do
p ARGF.lineno
exit
end
$ RBENV_VERSION=3.1.2 ruby -v f.rb f.rb
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [aarch64-linux]
2
$ RBENV_VERSION=3.0.4 ruby -v f.rb f.rb
ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [aarch64-linux]
2
$ RBENV_VERSION=2.7.6 ruby -v f.rb f.rb
ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [aarch64-linux]
1
</code></pre>
Ruby master - Bug #18887 (Closed): documentation for protected methods
https://bugs.ruby-lang.org/issues/18887
2022-06-29T08:08:57Z
znz (Kazuhiro NISHIYAMA)
<p>I think it is correct before the change.<br>
Which is correct?</p>
<p><a href="https://github.com/ruby/ruby/commit/962a3247b1b76770930200bcce7470a54dfb25c9" class="external">https://github.com/ruby/ruby/commit/962a3247b1b76770930200bcce7470a54dfb25c9</a></p>
Ruby master - Bug #18789 (Feedback): make test-bundled-gems failed after make install
https://bugs.ruby-lang.org/issues/18789
2022-05-18T01:01:41Z
znz (Kazuhiro NISHIYAMA)
<p>On snapshot-master CI, <code>make test-bundled-gems</code> failed.</p>
<p><a href="https://github.com/ruby/actions/runs/6476724416?check_suite_focus=true#step:17:118" class="external">https://github.com/ruby/actions/runs/6476724416?check_suite_focus=true#step:17:118</a></p>
<pre><code>./tool/test-bundled-gems.rb:10:in `realpath': No such file or directory @ realpath_rec - /home/runner/work/actions/actions/snapshot-master/.bundle/bin/rake (Errno::ENOENT)
from ./tool/test-bundled-gems.rb:10:in `<main>'
make: *** [uncommon.mk:1410: test-bundled-gems-run] Error 1
</code></pre>
<p>I investigated it, it causes after <code>make install</code>.</p>
<p>How to reproduce:</p>
<ol>
<li>Run configure</li>
<li><code>make install</code></li>
<li><code>make test-bundled-gems</code></li>
</ol>
<p>or</p>
<p>In already built directory</p>
<ol>
<li><code>rm -rf path/to/srcdir/.bundle</code></li>
<li><code>make install</code></li>
<li><code>make test-bundled-gems</code></li>
</ol>
<p>If I run <code>rm -rf path/to/srcdir/.bundle</code> and <code>make test-bundled-gems</code> without <code>make install</code>, <code>.bundle/bin/rake</code> exists.</p>
Ruby master - Bug #18759 (Closed): snapshot-ruby_2_7: test failure on macos-12
https://bugs.ruby-lang.org/issues/18759
2022-04-28T00:18:36Z
znz (Kazuhiro NISHIYAMA)
<p>snapshot tarball のテストに macos-12 を追加したところ、 snapshot-ruby_2_7 で failure が発生していました。</p>
<p><a href="https://github.com/ruby/actions/runs/6199339063?check_suite_focus=true#step:17:138" class="external">https://github.com/ruby/actions/runs/6199339063?check_suite_focus=true#step:17:138</a></p>
<pre><code>
1) Failure:
TestRipper::ParserEvents#test_block_variables [/Users/runner/work/actions/actions/snapshot-ruby_2_7/test/ripper/test_parser_events.rb:1506]:
<a href="https://blade.ruby-lang.org/ruby-dev/39423">[ruby-dev:39423]</a>
pid 44233 exit 1
| -:1:in `setrlimit': Invalid argument - setrlimit (Errno::EINVAL)
| from -:1:in `<main>'
.
1. [1/2] Assertion for "stdout"
| <["[fcall(proc,[],&block([],[unary(!,ref(y))]))]"]> expected but was
| <[]>.
2. [2/2] Assertion for "stderr"
| <[]> expected but was
| <["-:1:in `setrlimit': Invalid argument - setrlimit (Errno::EINVAL)",
| "\tfrom -:1:in `<main>'"]>.
</code></pre>
<p>該当するテストは master では <a href="https://github.com/ruby/ruby/commit/1c7f5a57125001447dc6173847dc68aa50bd8e93" class="external">https://github.com/ruby/ruby/commit/1c7f5a57125001447dc6173847dc68aa50bd8e93</a> で setrlimit を使わないようになっていました。</p>
<p>コマンドラインでいくつかの値を試してみたところ、 macos-12 での EINVAL は設定しようとしている値が小さすぎるからのようでした。</p>
<pre><code>% /usr/bin/ruby -ve 'Process.setrlimit(Process::RLIMIT_AS, 1000*1024*1024)'
ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.arm64e-darwin21]
-e:1:in `setrlimit': Invalid argument - setrlimit (Errno::EINVAL)
from -e:1:in `<main>'
% /usr/bin/ruby -ve 'lim=Process.getrlimit(Process::RLIMIT_AS); p lim; Process.setrlimit(Process::RLIMIT_AS, lim[0]/2); p Process.getrlimit(Process::RLIMIT_AS)'
ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.arm64e-darwin21]
[9223372036854775807, 9223372036854775807]
[4611686018427387903, 4611686018427387903]
</code></pre>
Ruby master - Bug #18643 (Closed): test-bundler failed on ruby_3_1 CI
https://bugs.ruby-lang.org/issues/18643
2022-03-18T04:25:49Z
znz (Kazuhiro NISHIYAMA)
<p>I think that this spec has failed since newer bundler released.</p>
<p><a href="https://github.com/ruby/actions/runs/5590419280?check_suite_focus=true#step:18:199" class="external">https://github.com/ruby/actions/runs/5590419280?check_suite_focus=true#step:18:199</a></p>
<pre><code>
expected "Running `bundle update --bundler \"> 0.a\"` with bundler 2.3.7\nHTTP GET https://index.rubygems.org/...ctions/actions/snapshot-ruby_3_1/tmp/4/gems/system/specifications/rack-1.2.gemspec\nBundle updated!" to include "Using bundler 2.3.7\n"
Diff:
@@ -1,19 +1,37 @@
-Using bundler 2.3.7\n
+Running `bundle update --bundler "> 0.a"` with bundler 2.3.7
+HTTP GET https://index.rubygems.org/versions
+HTTP 200 OK https://index.rubygems.org/versions
+Fetching gem metadata from https://rubygems.org/
+Looking up gems ["bundler"]
+HTTP GET https://index.rubygems.org/info/bundler
+HTTP 200 OK https://index.rubygems.org/info/bundler
+Updating bundler to 2.3.9.
+Fetching bundler 2.3.9
+Installing bundler 2.3.9
+Running `bundle update --bundler "> 0.a"` with bundler 2.3.9
+Found no changes, using resolution from the lockfile
+Using bundler 2.3.9
+0: bundler (2.3.9) from /home/runner/work/actions/actions/snapshot-ruby_3_1/tmp/4/gems/system/specifications/bundler-2.3.9.gemspec
+Using prints_loaded_gems 1.0
+0: prints_loaded_gems (1.0) from /home/runner/work/actions/actions/snapshot-ruby_3_1/tmp/4/gems/system/specifications/prints_loaded_gems-1.0.gemspec
+Using rack 1.2
+0: rack (1.2) from /home/runner/work/actions/actions/snapshot-ruby_3_1/tmp/4/gems/system/specifications/rack-1.2.gemspec
+Bundle updated!
# ./spec/bundler/commands/binstubs_spec.rb:229:in `block (5 levels) in <top (required)>'
# ./spec/bundler/spec_helper.rb:101:in `block (4 levels) in <top (required)>'
# ./spec/bundler/spec_helper.rb:101:in `block (3 levels) in <top (required)>'
# ./spec/bundler/support/helpers.rb:350:in `block in with_gem_path_as'
# ./spec/bundler/support/helpers.rb:364:in `without_env_side_effects'
# ./spec/bundler/support/helpers.rb:345:in `with_gem_path_as'
# ./spec/bundler/spec_helper.rb:100:in `block (2 levels) in <top (required)>'
</code></pre>
<p>It can reproduce with a small example.</p>
<p>Spec expects 3.0's behavior:</p>
<pre><code>$ rbenv local 3.0.3
$ bundle init
Writing new Gemfile to /tmp/x/Gemfile
$ bundle i
The Gemfile specifies no dependencies
Resolving dependencies...
Bundle complete! 0 Gemfile dependencies, 1 gem now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
$ bundle update --bundler "> 0.a"
The Gemfile specifies no dependencies
Bundle updated!
$
</code></pre>
<p>Actual 3.1's behavior:</p>
<pre><code>$ rbenv local 3.1.1
$ bundle init
Writing new Gemfile to /tmp/x/Gemfile
$ bundle i
The Gemfile specifies no dependencies
Resolving dependencies...
Bundle complete! 0 Gemfile dependencies, 1 gem now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
$ bundle update --bundler "> 0.a"
Fetching gem metadata from https://rubygems.org/.
The Gemfile specifies no dependencies
Bundle updated!
$
</code></pre>
<p>I'm not sure which is expected behavior: spec's or changed implementation.</p>
Ruby master - Bug #18469 (Closed): Backport c764e368bd9c0487e6cc97f8a62e0e0e99a0d7c5
https://bugs.ruby-lang.org/issues/18469
2022-01-10T11:24:19Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://github.com/ruby/ruby/blob/ruby_3_1/NEWS.md#mjit" class="external">https://github.com/ruby/ruby/blob/ruby_3_1/NEWS.md#mjit</a> says</p>
<pre><code>The default --mjit-max-cache is changed from 100 to 10000.
</code></pre>
<p>But <code>ruby --help</code> says 100 yet.</p>
<p>So I think <a href="https://github.com/ruby/ruby/commit/c764e368bd9c0487e6cc97f8a62e0e0e99a0d7c5" class="external">https://github.com/ruby/ruby/commit/c764e368bd9c0487e6cc97f8a62e0e0e99a0d7c5</a> is required to backport to ruby_3_1 branch.</p>
Ruby master - Bug #18158 (Closed): Pathname#each_entry without block does not return Enumerator
https://bugs.ruby-lang.org/issues/18158
2021-09-09T15:04:26Z
znz (Kazuhiro NISHIYAMA)
<p><code>Pathname#each_child</code> without block returns <code>Enumerator</code>.<br>
But <code>Pathname#each_entry</code> without block does not return <code>Enumerator</code>.</p>
<pre><code>% ruby -r pathname -e 'p Pathname(".").each_child.class'
Enumerator
% ruby -r pathname -e 'p Pathname(".").each_entry.class'
-e:1:in `foreach': no block given (LocalJumpError)
from -e:1:in `each_entry'
from -e:1:in `<main>'
</code></pre>
Ruby master - Bug #17590 (Closed): `M.prepend M` has hidden side effect
https://bugs.ruby-lang.org/issues/17590
2021-01-29T05:19:40Z
znz (Kazuhiro NISHIYAMA)
<p><code>M.prepend M</code> raises ArgumentError, but it has hidden side effect.</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">module</span> <span class="nn">M</span><span class="p">;</span> <span class="k">end</span>
<span class="k">class</span> <span class="nc">C</span><span class="p">;</span> <span class="k">end</span>
<span class="no">C</span><span class="p">.</span><span class="nf">prepend</span> <span class="no">M</span>
<span class="no">C</span><span class="p">.</span><span class="nf">include</span> <span class="no">M</span>
<span class="no">M</span><span class="p">.</span><span class="nf">prepend</span> <span class="no">M</span> <span class="k">rescue</span> <span class="kp">nil</span>
<span class="k">module</span> <span class="nn">M2</span><span class="p">;</span> <span class="k">end</span>
<span class="no">M2</span><span class="p">.</span><span class="nf">prepend</span> <span class="no">M</span>
<span class="no">C</span><span class="p">.</span><span class="nf">include</span> <span class="no">M2</span>
<span class="nb">p</span> <span class="no">C</span><span class="p">.</span><span class="nf">ancestors</span> <span class="c1"># => [M, C, M2, M, M2, Object, Kernel, BasicObject]</span>
</code></pre>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">module</span> <span class="nn">M</span><span class="p">;</span> <span class="k">end</span>
<span class="k">class</span> <span class="nc">C</span><span class="p">;</span> <span class="k">end</span>
<span class="no">C</span><span class="p">.</span><span class="nf">prepend</span> <span class="no">M</span>
<span class="no">C</span><span class="p">.</span><span class="nf">include</span> <span class="no">M</span>
<span class="k">module</span> <span class="nn">M2</span><span class="p">;</span> <span class="k">end</span>
<span class="no">M2</span><span class="p">.</span><span class="nf">prepend</span> <span class="no">M</span>
<span class="no">C</span><span class="p">.</span><span class="nf">include</span> <span class="no">M2</span>
<span class="nb">p</span> <span class="no">C</span><span class="p">.</span><span class="nf">ancestors</span> <span class="c1"># => [M, C, M2, Object, Kernel, BasicObject]</span>
</code></pre>
Ruby master - Bug #17517 (Closed): File.expand_path returns us-ascii when both arguments are asci...
https://bugs.ruby-lang.org/issues/17517
2021-01-06T11:32:49Z
znz (Kazuhiro NISHIYAMA)
<p>Is this intentional?</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="nb">p</span> <span class="n">__dir__</span><span class="p">.</span><span class="nf">encoding</span> <span class="c1">#=> #<Encoding:UTF-8></span>
<span class="nb">p</span> <span class="s1">'hoge'</span><span class="p">.</span><span class="nf">encoding</span> <span class="c1">#=> #<Encoding:UTF-8></span>
<span class="nb">p</span> <span class="no">File</span><span class="p">.</span><span class="nf">expand_path</span><span class="p">(</span><span class="s1">'hoge'</span><span class="p">,</span> <span class="n">__dir__</span><span class="p">).</span><span class="nf">encoding</span> <span class="c1">#=> #<Encoding:US-ASCII></span>
</code></pre>
<pre><code>% docker run -it --rm ghcr.io/ruby/all-ruby env ALL_RUBY_SINCE=ruby-1.9 ./all-ruby -e 'p File.expand_path("hoge".encode("utf-8"), "/".encode("utf-8")).encoding'
ruby-1.9.0-0 -e:1:in `encode': transcoding not supported (from ASCII-8BIT to UTF-8) (ArgumentError)
from -e:1:in `<main>'
exit 1
ruby-1.9.0-1 #<Encoding:ASCII-8BIT>
ruby-1.9.0-2 #<Encoding:US-ASCII>
...
ruby-1.9.1-p129 #<Encoding:US-ASCII>
ruby-1.9.1-p243 #<Encoding:UTF-8>
...
ruby-1.9.2-preview1 #<Encoding:UTF-8>
ruby-1.9.2-preview3 #<Encoding:US-ASCII>
...
ruby-3.0.0 #<Encoding:US-ASCII>
</code></pre>
Ruby master - Bug #17501 (Closed): TestNetHTTPS#test_get CI failure
https://bugs.ruby-lang.org/issues/17501
2021-01-02T15:29:00Z
znz (Kazuhiro NISHIYAMA)
<p>しばらく前から snapshot tarball の macos-latest で発生している <code>TestNetHTTPS#test_get</code> の failure ですが、手元の macOS Catalina 10.15.7 に homebrew で入れた <code>openssl@1.1: stable 1.1.1i (bottled) [keg-only]</code> の環境では SERVER_CERT, CA_CERT の順番を入れ替えると通るようになりました。</p>
<p>他の環境では試していないので、このままだと他の環境で通らなくなるかもしれません。</p>
<p>master や 3.0 では webrick は外されているので Closed でバックポート管理用のみのチケットとして作成しています。<br>
他のバージョンの snapshot tarball では確認していないので、 Backport 欄は 2.6 だけ REQUIRED にしています。</p>
<pre><code class="diff syntaxhl" data-language="diff"><span class="gd">--- test/net/http/test_https.rb.orig 2021-01-03 00:03:24.000000000 +0900
</span><span class="gi">+++ test/net/http/test_https.rb 2021-01-03 00:03:26.000000000 +0900
</span><span class="p">@@ -45,7 +45,7 @@</span>
assert_equal($test_net_http_data, res.body)
}
# TODO: OpenSSL 1.1.1h seems to yield only SERVER_CERT; need to check the incompatibility
<span class="gd">- certs.zip([SERVER_CERT, CA_CERT]) do |actual, expected|
</span><span class="gi">+ certs.zip([CA_CERT, SERVER_CERT]) do |actual, expected|
</span> assert_equal(expected.to_der, actual.to_der)
end
rescue SystemCallError
</code></pre>
<p>CI でのエラーのログ:<br>
<a href="https://github.com/ruby/actions/runs/1636574804?check_suite_focus=true#step:17:195" class="external">https://github.com/ruby/actions/runs/1636574804?check_suite_focus=true#step:17:195</a></p>
<pre><code>ruby -v: ruby 2.6.7p150 (2020-12-09 revision 67888) [x86_64-darwin19]
Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems" --excludes-dir=./test/excludes --name=!/memory_leak/ -q --tty=no --exclude=/testunit/ --exclude=/minitest/
# Running tests:
.SS.....S
Retrying...
1) Failure:
TestNetHTTPS#test_get [/Users/runner/work/actions/actions/snapshot-ruby_2_6/test/net/http/test_https.rb:49]:
<"0\x82\x03\xE30\x82\x02\xCB\xA0\x03\x02\x01\x02\x02\x01\x020\r\x06\t*\x86H\x86\xF7\r\x01\x01\v\x05\x000\x81\x8C1\v0\t\x06\x03U\x04\x06\x13\x02JP1\x100\x0E\x06\x03U\x04\b\f\aShimane1\x140\x12\x06\x03U\x04\a\f\vMatz-e city1\x170\x15\x06\x03U\x04\n" +
"\f\x0ERuby Core Team1\x150\x13\x06\x03U\x04\x03\f\fRuby Test CA1%0#\x06\t*\x86H\x86\xF7\r\x01\t\x01\x16\x16security@ruby-lang.org0\x1E\x17\r190102032713Z\x17\r240101032713Z0`1\v0\t\x06\x03U\x04\x06\x13\x02JP1\x100\x0E\x06\x03U\x04\b\f\aShimane1\x170\x15\x06\x03U\x04\n" +
"\f\x0ERuby Core Team1\x120\x10\x06\x03U\x04\v\f\tRuby Test1\x120\x10\x06\x03U\x04\x03\f\tlocalhost0\x82\x01\"0\r\x06\t*\x86H\x86\xF7\r\x01\x01\x01\x05\x00\x03\x82\x01\x0F\x000\x82\x01\n" +
"\x02\x82\x01\x01\x00\xE8\xDA\x9C\x01.+\x10\xECI\xCD^\a\x13\a\x9Cp\x9E\xC6t\xBC\x13\xC2\xE1o\xC6\x82\xFD\xE3H\xE0,\xA5h\xC7\x9EB\xDE`Te\xE6j\x14Wz0\xD0\xCC\xB5\xB6\xD9\xC3\xD2\xDF\xC9%\x97Tg\xCF\xF6\xBE^\xCB\x8B\xEE\x03\xC5\xE1\xE2\xF9\xE7\xF7\xD1\fG\xF0\xB8\xDA3Z\xADA\xAD\xE7\xB5\xA2{\xB7\xBF0\xDA`\xF8\xE3T\xA2\xBC:\xFD\et\xD9\xDCtB\xE9)\xBE\xDF\xAC\xB4O\xEB2\xF4\x06\xF1\xE1\x8CK\xA8\x8B\xFB)\xE7\xB1\xBF\x1D\x01\xEEs\x0F\xF9@\xDC\xD5\x15y\xD9\xC6s\xD0\xC0\xDD\xCB\xE4\xDA\x19G\x80\xC6\x14\x04r\xFD\x9A|\x8F\x11\x82vI\x04y\xCC\xF2\\1\"\x95\x13>]@\xA6M\xE0\xA3\x02&}R;\xBB\xEDe\xA1\x0F\xEDk\xB0<\xD4\xDEa\x15^\xD3\xDDh\t\x9FJW\xA5\xC2\xA9m\x86\x92\xC5\xF4\xA4\xD4\xB7\x13;Rc$\x05\xE2\xCC\xE3\x8A<\xD454+\x10\xBBXr\xE7\xE1\x8D\x1Dt\x8Ca\x16 =\xD0\x1CN\x8Fn\xFD\xFEd\x10OA\x02\x03\x01\x00\x01\xA3{0y0\t\x06\x03U\x1D\x13\x04\x020\x000,\x06\t`\x86H\x01\x86\xF8B\x01\r\x04\x1F\x16\x1DOpenSSL Generated Certificate0\x1D\x06\x03U\x1D\x0E\x04\x16\x04\x14\xED(\xC2~\xABK\xC8\xE8\xFEUmf\x951\x1C-`\xF9\x0260\x1F\x06\x03U\x1D#\x04\x180\x16\x80\x14\xF6\xD1\")\xD5=#\xD7^\xAD\f\x9C\xE6u\x8F\x9D\xCD\xF8\x9DS0\r\x06\t*\x86H\x86\xF7\r\x01\x01\v\x05\x00\x03\x82\x01\x01\x00\x1D\xB8\xC5\x8BrA e\xAD'o\x15c\x06&\x12\x8D\x9C\xAD\xCA\xF4\xDB\x97\xB4\x90\xCB\xFF5\x94\xBB*\xA7\xA1\xAB\x1E5-\xA5?\xC9$\xB0\x1AX\x89u>\x81\n" +
",O\x98\xF9Q\xFB\xC0\xA3\t\xD0\n" +
"\x9B\xE7\xA2\xB7\xC3`@\xC8\xF4m\xB2jV\x12\x17L\x00$1\xDF\x9C`\xAE\xB1hT\xA9\xE6\xB5J\x04\xE6\x92\x05\x86\xD9Z\xDC\x960\xA5X\xDE\x14\x99\x0F\xE5\x15\x89>\x9B\xEB\x80\xE3\xBD\x83\xC3\xEA35K>/\xD3\rd\x93g\x7F\x8D\xF5?\f'\xBC7Z\xCC\xD6G\x16\xAFZb\xD2\xDAQ\xF8t\x06k$\xAD(h\b\x987}\xED\x0E\xAB\x1E\x82a\x05\xD0\xBAu\xA0\xAB!\xB0\x9A\xFD+T\x86\x1D\r\x1F\xC2\xD4w\x1Fr&^\xAD\x8A\x9F\t6mD\xBEt\xC2Z>\xFF\\\x9Du\xD68{\xC59\xF9Dn\xA1\xD1\x8E\xFFc\xDB\xC4\xBB\xC6\x91\x92\xCA\\`\x9B\x1D\xEB\n" +
"\xDE\b\xEE\xBF\xDAv\x03eb)\x8B\xF8\x7F\xC7\x86s\x1E\xF6\x1F-\x89i\xFD\xBE\xBDn"> expected but was
<"0\x82\x03\xED0\x82\x02\xD5\xA0\x03\x02\x01\x02\x02\t\x00\x89m\xBF\x1A\xC5\x02\xE4\xA70\r\x06\t*\x86H\x86\xF7\r\x01\x01\v\x05\x000\x81\x8C1\v0\t\x06\x03U\x04\x06\x13\x02JP1\x100\x0E\x06\x03U\x04\b\f\aShimane1\x140\x12\x06\x03U\x04\a\f\vMatz-e city1\x170\x15\x06\x03U\x04\n" +
"\f\x0ERuby Core Team1\x150\x13\x06\x03U\x04\x03\f\fRuby Test CA1%0#\x06\t*\x86H\x86\xF7\r\x01\t\x01\x16\x16security@ruby-lang.org0\x1E\x17\r190102025828Z\x17\r240101025828Z0\x81\x8C1\v0\t\x06\x03U\x04\x06\x13\x02JP1\x100\x0E\x06\x03U\x04\b\f\aShimane1\x140\x12\x06\x03U\x04\a\f\vMatz-e city1\x170\x15\x06\x03U\x04\n" +
"\f\x0ERuby Core Team1\x150\x13\x06\x03U\x04\x03\f\fRuby Test CA1%0#\x06\t*\x86H\x86\xF7\r\x01\t\x01\x16\x16security@ruby-lang.org0\x82\x01\"0\r\x06\t*\x86H\x86\xF7\r\x01\x01\x01\x05\x00\x03\x82\x01\x0F\x000\x82\x01\n" +
"\x02\x82\x01\x01\x00\xCEy[\x8D\x15a\xCFSe\xBA\xD1\xD5\xAE\x17\x06\x9C\xAF\x16\xD2\xAB\xA0\xDA\xE8\xCA^\xFDg\x8D \xB8S\xA9\xC9\x17\xAAr\xEC\x8FDy\xE8UI\xA2\x9E?+\xFE#\xDC\xF7+R\xE7}A\xCE\xB5F\xDD\xC1\xD2\x82\xEF\xBC\x8D\xEB\xA0:\xABf\xAA\xCE\xEEj\xD3\xDF\xCDK)\x1Cdc\x88\x17A\xAE\"\xD6\b\xDE{\xD6\xDC\x8A\x81u\xD7\xDF\xD9\xF7\xEC\xC9\x1F\xBD\xA4\x18\xDFo\x90\b<\xFD<Z\x8C\x05\xF6\xAE,\xD5\xE1\x94/\x06\\\xE3\r\x81\xF0\xF1a\xB7\x16\x005\xDE\xDD\x06\xF1\x8B\\Y\\\xB9\xFB\xFD\xB4;s\xC9\x18\xB8\xB7\xB7\xAA\xC4$I\x91\x94\bd\xD6z\fq\xC8&\xB3qz3\x88-\xF1\xCBj\xB25\xDB)<T\xAE\x8B\xD8\xB1\xB8Z\x01\xAA\xC9\xE7\x8F\x89\x1C\x9D\xD6\x8DLn\xE8\x80\x15\x8A\x80\xC2\x95\xCDQ\xB4J\x83\x93Zdl\x01\x1D\x99<Q\x9F\xAE\x14\xABu@\xC0TD\xEEQX\\\xB5s~=\x8D\xB5\xAC\xCD:\x85\xC8\xBE\v\x9D\xB8=\x1E\x10(\xC1\x02\x03\x01\x00\x01\xA3P0N0\x1D\x06\x03U\x1D\x0E\x04\x16\x04\x14\xF6\xD1\")\xD5=#\xD7^\xAD\f\x9C\xE6u\x8F\x9D\xCD\xF8\x9DS0\x1F\x06\x03U\x1D#\x04\x180\x16\x80\x14\xF6\xD1\")\xD5=#\xD7^\xAD\f\x9C\xE6u\x8F\x9D\xCD\xF8\x9DS0\f\x06\x03U\x1D\x13\x04\x050\x03\x01\x01\xFF0\r\x06\t*\x86H\x86\xF7\r\x01\x01\v\x05\x00\x03\x82\x01\x01\x00\xC6>\xC5\xFE\xED\xC2\xDD\xF8*\xDB\x83{\x84d@\xA1\xFE\xC2\x94T1\x1Aj? d\xF4\x00\x84\xB3[q\xE2U\x88\x85j)\n" +
"\x85\xB3\xB57\x00\xFDh\x1AC\xF1\x9C\x1E\xEBk\x02\xA8\xC8|\x8Ce\x7FoO\xAAh\xE3\x91\x9Df\r\xCBdz\xAF\xD1d\x01 \x96gE\xEB\x19\xF7n\x18\x06\x0F\x99l\xE2\x90\xAFpoE\xCAq\xA7\x19\xCD\xB8\x83\xA3+\x8CSk\x05\x85\x12\xDA\"\x19\xB2\r\xFA\x8BB\t\xB3\n" +
"?\x0F.\x87.\x98B\x9A\xCD\x810 \xF7\r\xE5\xAD~7\x8FR$\xE6@rh\xE8{\x10 \xA3\xFF\xBB\x83x\x16\xF7\x9E\xB8\xC0H\x9D\xE8\xB63\x85T\xEF\x87\xCB]\xB9\x8A\x97Q}\x00E\xFB$3\xF7\x04\xA4\x99\e_B\x87\x9AgR\x8E.\\\xCDn51\xAC\x8BN\xCF\xE1\x8D,+\x8E>H\xA0B\xD1\xB6\x04\x15\xB0\xCA\xD1\xE4\x162\xB5\xF7\x90\x88d?\x1C\x88Z\x1C]\xAB\xDF\xCD\xA8\xF6#J\e\x92\x10\b@\xE8$\xA9\x99\x184\xA6\xA7>\x98">.
Finished tests in 172.436403s, 118.3741 tests/s, 13007.3405 assertions/s.
20412 tests, 2242939 assertions, 1 failures, 0 errors, 70 skips
</code></pre>
Ruby master - Bug #17358 (Closed): Backport 1ca9facab6c85264168b4c0a18c24f489cabcc9f
https://bugs.ruby-lang.org/issues/17358
2020-12-01T07:13:52Z
znz (Kazuhiro NISHIYAMA)
<p>monitor が C 実装になったときから rdoc が生成されなくなっていたようで、 <code>ext/.document</code> に追加する必要があったようです。</p>
<p>C 実装になったのが 2.7 からで、2.6 以前には影響しないようなので、2.7 へのバックポートをお願いします。</p>
Ruby master - Bug #17254 (Closed): ENV.replace may set nil instead of the proper value
https://bugs.ruby-lang.org/issues/17254
2020-10-08T10:20:52Z
znz (Kazuhiro NISHIYAMA)
<p>On docs.ruby-lang.org, it uses <a href="https://snapcraft.io/ruby" class="external">snap ruby</a>, and it failed to run <code>rdoc</code>.</p>
<pre><code>Oct 07 13:20:08 docs-2020.ruby-lang.org env[6183]: rdoc --title Documentation for Ruby master --main README.md --output /var/www/docs.ruby-lang.org/releases/20200916140300/master -U --all --encoding=UTF-8 .
Oct 07 13:20:08 docs-2020.ruby-lang.org env[6183]: <internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError)
Oct 07 13:20:08 docs-2020.ruby-lang.org env[6183]: from <internal:gem_prelude>:1:in `<internal:gem_prelude>'
Oct 07 13:20:08 docs-2020.ruby-lang.org env[6183]: rake aborted!
</code></pre>
<p>I investigate it, it caused by setting nil instead of the proper value in <code>ENV.replace</code>.</p>
<pre><code>vagrant@buster:/tmp/t$ cat Gemfile
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
# gem "rails"
vagrant@buster:/tmp/t$ env PATH=/var/www/docs.ruby-lang.org/shared/bundle/ruby/2.7.0/bin:/snap/bin:$PATH DEBIAN_DISABLE_RUBYGEMS_INTEGRATION=1 bundle exec env -u RUBYOPT ruby -r/snap/ruby/189/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/setup -e 'p ENV["RUBYLIB"]'
"/snap/ruby/189/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib"
</code></pre>
<p>Calling <code>ENV.clear</code> before <code>ENV.replace</code> resolves this issue.</p>
<pre><code>vagrant@buster:/tmp/t$ cat /tmp/clear-before-replace.rb
class << ENV
alias orig_replace replace
def replace(h)
clear
orig_replace(h)
end
end
vagrant@buster:/tmp/t$ env PATH=/var/www/docs.ruby-lang.org/shared/bundle/ruby/2.7.0/bin:/snap/bin:$PATH DEBIAN_DISABLE_RUBYGEMS_INTEGRATION=1 bundle exec env -u RUBYOPT ruby -r/tmp/clear-before-replace -r/snap/ruby/189/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/setup -e 'p ENV["RUBYLIB"]'
"/snap/ruby/189/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib:/snap/ruby/189/lib/ruby/2.7.0:/snap/ruby/189/lib/ruby/2.7.0/amd64"
</code></pre>
<p>Where should call <code>ENV.clear</code>?<br>
In <code>ENV.replace</code> or caller of <code>ENV.replace</code>?</p>
Ruby master - Bug #17217 (Closed): Backport request: GitHub Actions set-env → $GITHUB_ENV
https://bugs.ruby-lang.org/issues/17217
2020-10-06T02:48:08Z
znz (Kazuhiro NISHIYAMA)
<p>Please backport <a href="https://github.com/ruby/ruby/pull/3630" class="external">https://github.com/ruby/ruby/pull/3630</a></p>
<p><code>set-env</code> is deprecated, and it will be disabled in the future.</p>
<p><a href="https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/" class="external">https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/</a></p>
<blockquote>
<p>We are monitoring telemetry for the usage of these commands and plan to fully disable them in the future.</p>
</blockquote>
Ruby master - Bug #16949 (Closed): Psych tests failed with libyaml 0.2.5
https://bugs.ruby-lang.org/issues/16949
2020-06-10T15:04:03Z
znz (Kazuhiro NISHIYAMA)
<p>GitHub Actions CI failed on macOS, because Homebrew's <a href="https://github.com/Homebrew/homebrew-core/blob/90fecdb1745b65abb9883c2ad76b4e22e297b8ff/Formula/libyaml.rb" class="external">libyaml</a> is 0.2.5 now.<br>
So please backport <a class="changeset" title="[ruby/psych] Fixing compatibility with libyaml 0.2.5 The main issue is that commas aren't allowe..." href="https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/7e289cdf3fed588b2d5a6973e29f9ff95cb8d76c">7e289cdf3fed588b2d5a6973e29f9ff95cb8d76c</a>.</p>
<p><a href="https://github.com/ruby/actions/runs/757794503?check_suite_focus=true#step:17:194" class="external">https://github.com/ruby/actions/runs/757794503?check_suite_focus=true#step:17:194</a><br>
<a href="https://github.com/ruby/actions/runs/757791921?check_suite_focus=true#step:17:195" class="external">https://github.com/ruby/actions/runs/757791921?check_suite_focus=true#step:17:195</a><br>
<a href="https://github.com/ruby/actions/runs/757793556?check_suite_focus=true#step:16:147" class="external">https://github.com/ruby/actions/runs/757793556?check_suite_focus=true#step:16:147</a></p>
Ruby master - Bug #16901 (Closed): `-W:no-deprecated` does not stop some deprecated warnings
https://bugs.ruby-lang.org/issues/16901
2020-05-20T03:00:02Z
znz (Kazuhiro NISHIYAMA)
<pre><code>$ ruby -v -W:no-deprecated -e 'IO.read(IO::NULL,{dummy:0})'
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
-e:1: warning: Using the last argument as keyword parameters is deprecated
</code></pre>
<p>I attach a draft patch for ruby_2_7 branch.<br>
I don't know where declaration of <code>rb_warn_deprecated</code> should be.</p>
Ruby master - Bug #16639 (Closed): ARGF.each_line(chomp: true) cannot call without warning
https://bugs.ruby-lang.org/issues/16639
2020-02-18T02:30:46Z
znz (Kazuhiro NISHIYAMA)
<p><code>ARGF.each_line</code> with keyword arguments shows warnings on 2.7.0, and does not work on current master.</p>
<pre><code>$ ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin18]
$ ruby -e 'p ARGF.each_line(chomp: true).first' < /etc/hosts
-e:1: warning: Using the last argument as keyword parameters is deprecated
"##"
$ ruby -e 'p ARGF.each_line({chomp: true}).first' < /etc/hosts
-e:1: warning: Using the last argument as keyword parameters is deprecated
"##"
$ ruby -e 'p ARGF.each_line(**{chomp: true}).first' < /etc/hosts
-e:1: warning: Using the last argument as keyword parameters is deprecated
"##"
</code></pre>
<p><code>IO#each_line(chomp: true)</code> does not show warnings, and works on current master.</p>
<pre><code>ruby -e 'p ARGF.to_io.each_line(chomp: true).first' < /etc/hosts
"##"
</code></pre>
Ruby master - Bug #16445 (Closed): Time#inspect shows a fractional number
https://bugs.ruby-lang.org/issues/16445
2019-12-23T02:18:40Z
znz (Kazuhiro NISHIYAMA)
<p><code>Time#inspect</code> shows a fractional number.</p>
<pre><code>irb(main):001:0> Time.at(0.5)
=> 1970-01-01 09:00:00.5 +0900
irb(main):002:0> Time.at(0.1)
=> 1970-01-01 09:00:00 3602879701896397/36028797018963968 +0900
</code></pre>
<p>Is this intentional?</p>
Ruby master - Bug #16424 (Closed): abort without arguments does not print error info
https://bugs.ruby-lang.org/issues/16424
2019-12-15T06:17:06Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://docs.ruby-lang.org/ja/2.0.0/method/Kernel/m/abort.html" class="external">https://docs.ruby-lang.org/ja/2.0.0/method/Kernel/m/abort.html</a><br>
には「引数を省略した呼び出し時に $! が nil でなければその例外の メッセージを標準エラー出力 $stderr に出力」されるとありますが、 1.9 から出力されなくなっているようです。</p>
<pre><code>% docker run -it --rm rubylang/all-ruby env ALL_RUBY_SINCE=ruby-1.6 ./all-ruby -e 'begin;raise "foo";rescue;abort;end'
ruby-1.6.0 -e:1: foo (RuntimeError)
exit 1
...
ruby-1.8.7-p374 -e:1: foo (RuntimeError)
exit 1
ruby-1.9.0-0 exit 1
...
ruby-2.7.0-preview3 exit 1
</code></pre>
<p>笹田さんに直接確認してみたところ、バグということだったので、チケットとして登録しておきます。</p>
Ruby master - Bug #16353 (Closed): Backport 2a477e0e444de6344048101466fb9189b9defddc
https://bugs.ruby-lang.org/issues/16353
2019-11-19T06:37:25Z
znz (Kazuhiro NISHIYAMA)
<p>Please backport 2a477e0e444de6344048101466fb9189b9defddc to ruby_2_5.<br>
It may avoid occasional errors on macos.</p>
<p><a href="https://github.com/ruby/actions/runs/309307228#step:17:201" class="external">https://github.com/ruby/actions/runs/309307228#step:17:201</a></p>
<pre><code> 1) Error:
FTPTest#test_retrbinary_read_timeout_not_exceeded:
Net::ReadTimeout: Net::ReadTimeout
</code></pre>
<p><a href="https://github.com/ruby/actions/runs/309307228#step:17:216" class="external">https://github.com/ruby/actions/runs/309307228#step:17:216</a></p>
<pre><code> 2) Error:
FTPTest#test_retrbinary_read_timeout_not_exceeded:
Errno::EPIPE: Broken pipe
</code></pre>
<p><a href="https://github.com/ruby/actions/runs/322975425#step:17:202" class="external">https://github.com/ruby/actions/runs/322975425#step:17:202</a></p>
<pre><code> 1) Error:
FTPTest#test_retrbinary_read_timeout_not_exceeded:
Net::ReadTimeout: Net::ReadTimeout
</code></pre>
<p><a href="https://github.com/ruby/actions/runs/322975425#step:17:217" class="external">https://github.com/ruby/actions/runs/322975425#step:17:217</a></p>
<pre><code> 2) Error:
FTPTest#test_retrbinary_read_timeout_not_exceeded:
Errno::EPIPE: Broken pipe
</code></pre>
<p><a href="https://github.com/ruby/actions/runs/326044909#step:17:198" class="external">https://github.com/ruby/actions/runs/326044909#step:17:198</a></p>
<pre><code> 1) Error:
FTPTest#test_read_timeout_not_exceeded:
Net::ReadTimeout: Net::ReadTimeout
</code></pre>
Ruby master - Bug #16189 (Closed): Some rubygems tests failed when run across 0:00 UTC
https://bugs.ruby-lang.org/issues/16189
2019-09-30T01:44:51Z
znz (Kazuhiro NISHIYAMA)
<p>Some tests failed because <a href="https://github.com/ruby/ruby/blob/649a64ae29318501472f74798a12eb60871ab990/lib/rubygems/specification.rb#L106-L107" class="external">https://github.com/ruby/ruby/blob/649a64ae29318501472f74798a12eb60871ab990/lib/rubygems/specification.rb#L106-L107</a> set TODAY as 2019-09-29, and tests run on 2019-09-30.</p>
<p><a href="https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-master/log/20190929T232504Z.fail.html.gz" class="external">https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-master/log/20190929T232504Z.fail.html.gz</a></p>
<pre><code> 1) Failure:
TestGemSpecification#test_to_ruby_for_cache [/export/home/rubyci/chkbuild-sunc/tmp/build/20190929T232504Z/ruby/test/rubygems/test_gem_specification.rb:2518]:
--- expected
+++ actual
@@ -18,7 +18,7 @@
" +
" s.authors = [\"A User\".freeze]
" +
-" s.date = \"2019-09-29\"
+" s.date = \"2019-09-30\"
" +
" s.description = \"This is a test description\".freeze
" +
2) Failure:
TestGemSpecification#test_metadata_specs [/export/home/rubyci/chkbuild-sunc/tmp/build/20190929T232504Z/ruby/test/rubygems/test_gem_specification.rb:3651]:
--- expected
+++ actual
@@ -20,7 +20,7 @@
" +
" s.authors = [\"A User\".freeze]
" +
-" s.date = \"2019-09-30\"
+" s.date = \"2019-09-29\"
" +
" s.description = \"This is a test description\".freeze
" +
3) Failure:
TestGemSpecification#test_to_ruby [/export/home/rubyci/chkbuild-sunc/tmp/build/20190929T232504Z/ruby/test/rubygems/test_gem_specification.rb:2441]:
--- expected
+++ actual
@@ -18,7 +18,7 @@
" +
" s.authors = [\"A User\".freeze]
" +
-" s.date = \"2019-09-29\"
+" s.date = \"2019-09-30\"
" +
" s.description = \"This is a test description\".freeze
" +
4) Failure:
TestGemSpecification#test_to_ruby_fancy [/export/home/rubyci/chkbuild-sunc/tmp/build/20190929T232504Z/ruby/test/rubygems/test_gem_specification.rb:2581]:
--- expected
+++ actual
@@ -22,7 +22,7 @@
" +
" s.authors = [\"A User\".freeze]
" +
-" s.date = \"2019-09-29\"
+" s.date = \"2019-09-30\"
" +
" s.description = \"This is a test description\".freeze
" +
5) Failure:
TestGemSpecification#test_self_load_legacy_ruby [/export/home/rubyci/chkbuild-sunc/tmp/build/20190929T232504Z/ruby/test/rubygems/test_gem_specification.rb:1038]:
Expected: 2019-09-29 00:00:00 UTC
Actual: 2019-09-30 00:00:00 UTC
6) Failure:
TestGemSpecification#test_to_ruby_with_rsa_key [/export/home/rubyci/chkbuild-sunc/tmp/build/20190929T232504Z/ruby/test/rubygems/test_gem_specification.rb:2474]:
--- expected
+++ actual
@@ -18,7 +18,7 @@
" +
" s.authors = [\"A User\".freeze]
" +
-" s.date = \"2019-09-29\"
+" s.date = \"2019-09-30\"
" +
" s.description = \"This is a test description\".freeze
" +
7) Failure:
TestGemSpecification#test_date [/export/home/rubyci/chkbuild-sunc/tmp/build/20190929T232504Z/ruby/test/rubygems/test_gem_specification.rb:1697]:
Expected: 2019-09-29 00:00:00 UTC
Actual: 2019-09-30 00:00:00 UTC
</code></pre>
Ruby master - Bug #16177 (Closed): Some `*.rb` files on builddir cause Segmentation fault
https://bugs.ruby-lang.org/issues/16177
2019-09-24T10:05:16Z
znz (Kazuhiro NISHIYAMA)
<p>How to reproduce:</p>
<ol>
<li>Create dummy files by <code>./miniruby -e '%w[a b foo bar test zzz].each{|basename|File.write("#{basename}.rb", "raise %(do not load #{basename}.rb)")}'</code>
</li>
<li>Run <code>ruby/test_autoload.rb</code> like <code>make test-all TESTS='ruby/test_autoload.rb'</code>
</li>
</ol>
<p>Error log from raw logs:</p>
<pre><code>2019-09-24T09:48:24.3773590Z 2) Failure:
2019-09-24T09:48:24.3773760Z TestAutoload#test_autoload_same_file [/Users/runner/runners/2.158.0/work/ruby/ruby/test/ruby/test_autoload.rb:332]:
2019-09-24T09:48:24.3773930Z pid 39572 killed by SIGABRT (signal 6)
2019-09-24T09:48:24.3774450Z | #<Thread:0x00007f8851176ac0@-:9 run> terminated with exception (report_on_exception is true):
2019-09-24T09:48:24.3775010Z | /Users/runner/runners/2.158.0/work/ruby/ruby/b.rb:1:in `<top (required)>': do not load b.rb (RuntimeError)
2019-09-24T09:48:24.3775480Z | from -:9:in `require'
2019-09-24T09:48:24.3775910Z | from -:9:in `block in <main>'
2019-09-24T09:48:24.3776390Z | -:10: [BUG] Segmentation fault at 0x0000000000000019
</code></pre>
<p>attached full raw logs of <a href="https://github.com/ruby/ruby/pull/2482/checks?check_run_id=233890903#step:11:1" class="external">https://github.com/ruby/ruby/pull/2482/checks?check_run_id=233890903#step:11:1</a></p>
Ruby master - Bug #15369 (Closed): pp does not support endless range
https://bugs.ruby-lang.org/issues/15369
2018-12-03T01:33:28Z
znz (Kazuhiro NISHIYAMA)
<p>I think <code>nil</code> in output is not expetced.</p>
<pre><code>% rbenv exec irb --simple-prompt -r irb/completion
>> pp(1..)
1..nil
=> 1..
</code></pre>
Ruby master - Bug #15311 (Closed): `make check` causes `warning: No mjit_build_directory`
https://bugs.ruby-lang.org/issues/15311
2018-11-16T07:37:31Z
znz (Kazuhiro NISHIYAMA)
<p><code>make help</code> says:</p>
<pre><code> check: equals make test test-all test-spec
</code></pre>
<p>But <code>make check</code> does not depend <code>test-all</code> acctually, it does not create <code>mjit_build_dir.so</code>.</p>
<p>So <code>make check</code> outputs many <code>warning: No mjit_build_directory</code>, and fails at <code>TestJIT#test_unload_units</code>.</p>
Ruby master - Bug #15268 (Closed): Solarisでtest/drb/test_drbssl.rbが落ちる
https://bugs.ruby-lang.org/issues/15268
2018-10-29T15:38:55Z
znz (Kazuhiro NISHIYAMA)
<p>他のテストの結果が隠れてしまうので今は skip しているのですが、Solaris で test/drb/test_drbssl.rb が落ちます。</p>
<p>ほぼ同じような TCPSocket 直接と UNIXSocket では落ちていないので、Ruby/OpenSSL 側の問題ではないかと思っているので、担当者を openssl にしておきます。</p>
<p>症状としては</p>
<ul>
<li><a href="https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20181020T131807Z.fail.html.gz" class="external">https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20181020T131807Z.fail.html.gz</a></li>
<li><a href="https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20181020T132408Z.fail.html.gz" class="external">https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20181020T132408Z.fail.html.gz</a></li>
</ul>
<p>は BUG で落ちていて、</p>
<ul>
<li><a href="https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20181020T132506Z.fail.html.gz" class="external">https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20181020T132506Z.fail.html.gz</a></li>
</ul>
<p>は spawn した子プロセスからの通信の read で止まってしまって、タイムアウトして Error になってしまっています。</p>
<p>もうちょっと詳しい説明は<a href="https://blog.n-z.jp/ruby/2018-10-26-drbtest.html" class="external">blogに書いている</a>ので参考にして見てください。</p>
Ruby master - Bug #15177 (Closed): 起動した後にTZを変更するとTime#utcがずれることがある
https://bugs.ruby-lang.org/issues/15177
2018-09-29T11:12:56Z
znz (Kazuhiro NISHIYAMA)
<p>起動時に <code>TZ</code> を <code>right/Asia/Tokyo</code> にしていると <code>Time#utc</code> でローカルタイムと同じ時分秒になりますが、 <code>TZ=Asia/Tokyo</code> で起動してから <code>ENV['TZ']='right/Asia/Tokyo'</code> で変更すると <code>Time#utc</code> の結果がうるう秒のぶんだけずれます。</p>
<pre><code>$ TZ=Asia/Tokyo ruby -ve "ENV['TZ']='right/Asia/Tokyo';t=Time.at(2<<30);p t;p t.utc"
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
2038-01-19 12:13:41 +0900
2038-01-19 03:14:08 UTC
$ TZ=right/Asia/Tokyo ruby -ve "t=Time.at(2<<30);p t;p t.utc"
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
2038-01-19 12:13:41 +0900
2038-01-19 03:13:41 UTC
% TZ=Asia/Tokyo ruby -ve "t=Time.at(2<<30);p t;p t.utc"
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
2038-01-19 12:14:08 +0900
2038-01-19 03:14:08 UTC
</code></pre>
Ruby master - Bug #14958 (Closed): rand(endless_range) raises TypeError (no implicit conversion o...
https://bugs.ruby-lang.org/issues/14958
2018-08-01T15:21:46Z
znz (Kazuhiro NISHIYAMA)
<p>I think TypeError message is a bit strange.</p>
<pre><code class="console syntaxhl" data-language="console"><span class="gp">$</span><span class="w"> </span>ruby <span class="nt">-v</span>
<span class="go">ruby 2.6.0dev (2018-08-01 trunk 64154) [x86_64-linux]
</span><span class="gp">$</span><span class="w"> </span>ruby <span class="nt">-e</span> <span class="s1">'p rand(1..1)'</span>
<span class="go">1
</span><span class="gp">$</span><span class="w"> </span>ruby <span class="nt">-e</span> <span class="s1">'rand(1..)'</span>
<span class="go">Traceback (most recent call last):
</span><span class="gp"> 1: from -e:1:in `<main></span><span class="s1">'
</span><span class="go">-e:1:in `rand': no implicit conversion of Range into Integer (TypeError)
</span><span class="gp">$</span><span class="w"> </span>ruby <span class="nt">-e</span> <span class="s1">'rand(nil..nil)'</span>
<span class="go">Traceback (most recent call last):
</span><span class="gp"> 1: from -e:1:in `<main></span><span class="s1">'
</span><span class="go">-e:1:in `rand': no implicit conversion of Range into Integer (TypeError)
</span></code></pre>
Ruby master - Bug #14886 (Closed): ChangeLog section is obsolete
https://bugs.ruby-lang.org/issues/14886
2018-06-30T08:41:22Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://github.com/ruby/ruby/blob/trunk/doc/contributing.rdoc#changelog" class="external">ChangeLog section in doc/contributing.rdoc</a> is not useful now.<br>
But I think some parts are useful for commit log.<br>
For example: issue relationship.</p>
Ruby master - Bug #14885 (Closed): Is documenting-ruby a dead project?
https://bugs.ruby-lang.org/issues/14885
2018-06-30T08:27:16Z
znz (Kazuhiro NISHIYAMA)
<p>In <a href="https://github.com/ruby/ruby/blob/trunk/doc/contributing.rdoc#contributing-documentation" class="external">Contributing Documentation section in doc/contributing.rdoc</a> links to documenting-ruby.org , but <a href="https://github.com/documenting-ruby/ruby" class="external">https://github.com/documenting-ruby/ruby</a> is about 3 years old.<br>
I think it is a dead project.</p>
<p>If so, I want to remove the link.<br>
And I think contributing documents to <a href="https://github.com/ruby/ruby" class="external">https://github.com/ruby/ruby</a> is better alternative.</p>
Ruby master - Bug #14840 (Closed): `warning: constant Net::ProtoServerError is deprecated` only v...
https://bugs.ruby-lang.org/issues/14840
2018-06-10T04:51:13Z
znz (Kazuhiro NISHIYAMA)
<p>When ruby loads <code>net/protocol</code> via <code>net/http</code>, <code>Net::ProtoServerError</code> is deprecated.<br>
But via <code>net/smtp</code>, etc, it does not warn.<br>
Is this intentional?</p>
<pre><code>% ruby -r net/http -e 'Net::ProtoServerError'
-e:1: warning: constant Net::ProtoServerError is deprecated
% ruby -r net/smtp -e 'Net::ProtoServerError'
</code></pre>
Ruby master - Bug #14743 (Closed): Some links broken in README
https://bugs.ruby-lang.org/issues/14743
2018-05-08T14:19:42Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://github.com/ruby/docs.ruby-lang.org/issues/56" class="external">Some links broken in README</a> is original issue.<br>
And I tried to fix links, but some problems occur.</p>
<ol>
<li>Current README.md's link is <code>[win32/README.win32](win32/README.win32)</code> and it works on github, but rdoc generates broken link.</li>
<li>Using rdoc-ref suggested in <a href="https://github.com/ruby/rdoc/issues/618" class="external">Convert links to local files in markdown</a>, it works rdoc generated html, but it does not work on github.</li>
<li>Plain filename becomes link on rdoc generated html, but it does not become link on github.</li>
</ol>
<ul>
<li>Sample site: <a href="https://md-link-test-2018.netlify.com/" class="external">https://md-link-test-2018.netlify.com/</a>
</li>
<li>Source: <a href="https://github.com/znz/md-link-test-2018" class="external">https://github.com/znz/md-link-test-2018</a>
</li>
</ul>
<p>Which is better?<br>
Is there other better solution?</p>
Ruby master - Bug #14738 (Closed): Failed to load_from_binary on 2.5.1
https://bugs.ruby-lang.org/issues/14738
2018-05-04T16:21:46Z
znz (Kazuhiro NISHIYAMA)
<pre><code>% cat /tmp/1226.rb
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary("extra_data")
p RubyVM::InstructionSequence.load_from_binary(binary).eval # => 3
% ruby -v /tmp/1226.rb
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
<compiled>:1: warning: assigned but unused variable - num
Traceback (most recent call last):
1: from /tmp/1226.rb:3:in `<main>'
/tmp/1226.rb:3:in `load_from_binary': wrong argument type nil (expected String) (TypeError)
</code></pre>
<p>rubyfarm-bisect says first bad commit is <a href="https://github.com/ruby/ruby/commit/478003f6df40dc79d33c6ec86919f2dde07284be" class="external">r58979</a>.<br>
It seems trunk is aleady fixed.</p>
Ruby master - Bug #14576 (Third Party's Issue): rdoc of Random::Formatter
https://bugs.ruby-lang.org/issues/14576
2018-03-05T12:21:25Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://docs.ruby-lang.org/en/trunk/Random/Formatter.html" class="external">https://docs.ruby-lang.org/en/trunk/Random/Formatter.html</a> has following methods:</p>
<pre><code>#alphanumeric
#base64
#choose
#gen_random
#hex
#rand
#random_bytes
#random_number
#urlsafe_base64
#uuid
</code></pre>
<p>But <code>Random::Formatter.instance_methods</code> are only two methods.</p>
<pre><code>>> Random::Formatter.instance_methods
=> [:random_number, :rand]
</code></pre>
Ruby master - Bug #14427 (Closed): Backport r61469
https://bugs.ruby-lang.org/issues/14427
2018-01-31T14:56:04Z
znz (Kazuhiro NISHIYAMA)
<p>Please backport r61469 to ruby_2_5 branch.</p>
<p>2.5.0:</p>
<pre><code>% rbenv exec irb -r irb/completion --simple-prompt
>> {foo: 1}.fetch(:fooo)
Traceback (most recent call last):
3: from .../bin/irb:11:in `<main>'
2: from (irb):1
1: from (irb):1:in `fetch'
KeyError (key not found: :fooo
Did you mean? :foo)
</code></pre>
<p>trunk:</p>
<pre><code>>> {foo: 1}.fetch(:fooo)
Traceback (most recent call last):
3: from .../bin/irb:11:in `<main>'
2: from (irb):1
1: from (irb):1:in `fetch'
KeyError (key not found: :fooo)
Did you mean? :foo
</code></pre>
Ruby master - Bug #14325 (Closed): Set#reset raise RuntimeError instead of FrozenError
https://bugs.ruby-lang.org/issues/14325
2018-01-06T15:32:05Z
znz (Kazuhiro NISHIYAMA)
<p>I think it should use <code>FrozenError</code> instead of <code>RuntimeError</code>.<br>
I can't reproduce without modifying instance variable directly.</p>
<pre><code>% ruby -v -r set -e 'Set[].tap{|s|s.instance_variable_set(:@hash, :dummy)}.freeze.reset'
ruby 2.6.0dev (2018-01-06 trunk 61640) [x86_64-darwin16]
Traceback (most recent call last):
1: from -e:1:in `<main>'
.../lib/ruby/2.6.0/set.rb:527:in `reset': can't modify frozen Set (RuntimeError)
% ruby -v -I ./lib -r set -e 'Set[].tap{|s|s.instance_variable_set(:@hash, :dummy)}.freeze.reset'
ruby 2.6.0dev (2018-01-06 trunk 61640) [x86_64-darwin16]
Traceback (most recent call last):
1: from -e:1:in `<main>'
.../lib/set.rb:527:in `reset': can't modify frozen Set (FrozenError)
</code></pre>
<pre><code class="patch syntaxhl" data-language="patch"><span class="gh">diff --git a/lib/set.rb b/lib/set.rb
index 9642e74af4..d777b81b8f 100644
</span><span class="gd">--- a/lib/set.rb
</span><span class="gi">+++ b/lib/set.rb
</span><span class="p">@@ -524,7 +524,7 @@</span> def reset
if @hash.respond_to?(:rehash)
@hash.rehash # This should perform frozenness check.
else
<span class="gd">- raise "can't modify frozen #{self.class.name}" if frozen?
</span><span class="gi">+ raise FrozenError, "can't modify frozen #{self.class.name}" if frozen?
</span> end
self
end
</code></pre>
Ruby master - Bug #14266 (Closed): Set#clone(freeze: false) makes frozen internal hash
https://bugs.ruby-lang.org/issues/14266
2018-01-02T01:24:26Z
znz (Kazuhiro NISHIYAMA)
<pre><code>% irb -r irb/completion --simple-prompt
>> require 'set'
=> true
>> set=Set[].freeze.clone(freeze: false)
=> #<Set: {}>
>> set.frozen?
=> false
>> set.instance_variable_get(:@hash).frozen?
=> true
</code></pre>
<p>In <code>Set#initialize_clone</code>, clone hash without freeze keyword argument.<br>
But I think there is no easy way how to know freeze keyword argument value in <code>initialize_clone</code>.</p>
<pre><code> # Clone internal hash.
def initialize_clone(orig)
super
@hash = orig.instance_variable_get(:@hash).clone
end
</code></pre>
Ruby master - Bug #14264 (Closed): RDoc comment of warn does not mention uplevel:
https://bugs.ruby-lang.org/issues/14264
2018-01-01T15:23:38Z
znz (Kazuhiro NISHIYAMA)
<p><code>Kernel#warn</code> support uplevel keyword argument since 2.5.0, but rdoc does not mention it.</p>
<p><a href="https://github.com/ruby/ruby/blob/691b05e83c41d089c4f6c7a8bbac9dd63f36a144/error.c#L309-L325" class="external">https://github.com/ruby/ruby/blob/691b05e83c41d089c4f6c7a8bbac9dd63f36a144/error.c#L309-L325</a></p>
Ruby master - Bug #14262 (Closed): ArgumentError (negative level (-1)) when `warn "test message",...
https://bugs.ruby-lang.org/issues/14262
2017-12-31T10:33:16Z
znz (Kazuhiro NISHIYAMA)
<p>When <code>uplevel: -2</code>, error message says <code>negative level (-1)</code>.<br>
When <code>uplevel: -1</code>, no exception occur.<br>
What is expected behavior?</p>
<pre><code>% irb -r irb/completion --simple-prompt
>> warn("test", uplevel: -1)
(irb):1: warning: test
=> nil
>> warn("test", uplevel: -2)
Traceback (most recent call last):
3: from bin/irb:11:in `<main>'
2: from (irb):2
1: from (irb):2:in `warn'
ArgumentError (negative level (-1))
>> warn("test", uplevel: 0)
(irb):3: warning: test
=> nil
>> warn("test", uplevel: 1)
</code></pre>
Ruby master - Bug #14247 (Closed): Thread#fetch raise KeyError without key and receiver
https://bugs.ruby-lang.org/issues/14247
2017-12-27T12:06:24Z
znz (Kazuhiro NISHIYAMA)
<p>I found this by message without <code>Did you mean?</code>.</p>
<p>expected:</p>
<pre><code>% ruby -e 'th=Thread.current;th[:foo]=1;th.fetch(:fooo)'
Traceback (most recent call last):
1: from -e:1:in `<main>'
-e:1:in `fetch': key not found: "fooo" (KeyError)
Did you mean? :foo
</code></pre>
<p>actual:</p>
<pre><code>% ruby -e 'th=Thread.current;th[:foo]=1;th.fetch(:fooo)'
Traceback (most recent call last):
1: from -e:1:in `<main>'
-e:1:in `fetch': key not found: fooo (KeyError)
</code></pre>
Ruby master - Bug #14163 (Closed): Pages of rdoc include files which are not documents
https://bugs.ruby-lang.org/issues/14163
2017-12-09T13:34:33Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://docs.ruby-lang.org/en/trunk/" class="external">https://docs.ruby-lang.org/en/trunk/</a> includes <code>*.tt</code>, <code>*.gemspec</code>, Executable, Executable.bundler, Executable.standalone.<br>
But it seems there are not documents nor sources including documents.</p>
Ruby master - Bug #14075 (Closed): File.dirname("path without dir".taint) returns untainted string
https://bugs.ruby-lang.org/issues/14075
2017-11-02T13:00:58Z
znz (Kazuhiro NISHIYAMA)
<p>Is this intentional?</p>
<pre><code>% ruby -e 'p [File.dirname("foo/bar".taint).tainted?, File.dirname("hoge".taint).tainted?]'
[true, false]
</code></pre>
Ruby master - Bug #13906 (Closed): homepage in gemspec
https://bugs.ruby-lang.org/issues/13906
2017-09-15T16:00:21Z
znz (Kazuhiro NISHIYAMA)
<p>Some gemspec files set ruby-lang site instead of github site to homepage.<br>
Is it intentional?</p>
<pre><code>% git ls-files '*.gemspec' | xargs grep homepage | grep ruby-lang
ext/io/console/io-console.gemspec: s.homepage = "https://www.ruby-lang.org"
ext/openssl/openssl.gemspec: s.homepage = "https://www.ruby-lang.org/".freeze
ext/sdbm/sdbm.gemspec: s.homepage = "https://www.ruby-lang.org"
ext/stringio/stringio.gemspec: s.homepage = "https://www.ruby-lang.org".freeze
ext/strscan/strscan.gemspec: s.homepage = "https://www.ruby-lang.org"
lib/webrick/webrick.gemspec: s.homepage = "https://www.ruby-lang.org"
</code></pre>
Ruby master - Bug #13905 (Rejected): files in gemspec
https://bugs.ruby-lang.org/issues/13905
2017-09-15T15:56:02Z
znz (Kazuhiro NISHIYAMA)
<p>ext/zlib/zlib.gemspec の files をみると ext/zlib/extconf.rb のような top_srcdir からの相対パスらしき指定と gemspec からの相対パスらしき(upstreamでのパス?) zlib.gemspec のようなものが混在しているように見えます。</p>
<p>top_srcdir からの相対パスが正しいのなら ext/zlib がついていないファイルを指しているのはおかしいし、 gemspec ファイルからの相対パスなら ext/zlib がついているのがおかしいと思いました。</p>
<p>他の gemspec ファイルは確認していないのですが、lib/scanf.gemspec をみると lib/scanf.rb だけなので、top_srcdir からの相対パスが正しくて、そもそも sync されていないファイルが入っていたり、gemspec ファイルが入っていること自体がおかしい気がします。</p>
Ruby master - Bug #13854 (Closed): `make golf` broken
https://bugs.ruby-lang.org/issues/13854
2017-08-31T11:16:49Z
znz (Kazuhiro NISHIYAMA)
<p>make golf が失敗します。</p>
<pre><code>% make golf
...
compiling .../ruby/goruby.c golf_prelude.c
gcc: fatal error: cannot specify -o with -c, -S or -E with multiple files
compilation terminated.
uncommon.mk:951: ターゲット 'goruby.o' のレシピで失敗しました
</code></pre>
<p>たぶん r58724 の変更の</p>
<pre><code>$(MAINOBJ): $(srcdir)/$(MAINSRC)
$(ECHO) compiling $(srcdir)/$(MAINSRC)
$(Q) $(CC) $(MAINCPPFLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(srcdir)/$(MAINSRC)
</code></pre>
<p>が</p>
<pre><code>golf: $(LIBRUBY) $(GOLFOBJS) PHONY
$(Q) $(MAKE) $(mflags) MAINOBJ="$(GOLFOBJS)" PROGRAM=$(GORUBY)$(EXEEXT) program
</code></pre>
<p>のように MAINOBJ が複数になることを想定していなくて、<code>$(CSRCFLAG)$(srcdir)/$(MAINSRC)</code> の最後の MAINSRC が <code>goruby.c golf_prelude.c</code> に展開されてしまって失敗しているようです。</p>
Ruby master - Bug #13808 (Closed): lib/ipaddr.gemspec includes `git ls-files -z`
https://bugs.ruby-lang.org/issues/13808
2017-08-12T05:42:00Z
znz (Kazuhiro NISHIYAMA)
<p><code>git ls-files -z</code> in gemspec may occur error.</p>
<p>see <a href="https://bugs.ruby-lang.org/issues/13423" class="external">https://bugs.ruby-lang.org/issues/13423</a> and/or <a href="https://bugs.ruby-lang.org/issues/12736" class="external">https://bugs.ruby-lang.org/issues/12736</a></p>
Ruby master - Bug #13538 (Closed): head: illegal option -- c
https://bugs.ruby-lang.org/issues/13538
2017-05-03T02:01:04Z
znz (Kazuhiro NISHIYAMA)
<p><a href="http://blog.n-z.jp/blog/2017-05-02-ruby-sample.html" class="external">Solaris 11.3でビルドを試した</a>ところ、configure の最後で以下のようなエラーが出ました。</p>
<pre><code>---
Configuration summary for ruby version 2.5.0
head: illegal option -- c
usage: head [-n #] [-#] [filename...]
/export/home/vagrant/opt/ruby
head: illegal option -- c
usage: head [-n #] [-#] [filename...]
${prefix}
head: illegal option -- c
(略)
head: illegal option -- c
usage: head [-n #] [-#] [filename...]
yes
head: illegal option -- c
usage: head [-n #] [-#] [filename...]
man
---
</code></pre>
<p>head -c は <a href="http://pubs.opengroup.org/onlinepubs/9699919799/utilities/head.html" class="external">POSIX</a> になくて、代わりの手段を探してみたところ、<a href="http://qiita.com/richmikan@github/items/bd4b21cf1fe503ab2e5c#head%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89" class="external">どの環境でも使えるシェルスクリプトを書くためのメモ ver4.51 - Qiita の headコマンド</a> にあったので <code>head -c26</code> を <code>dd bs=1 count=26 2>/dev/null</code> に書き換えます。</p>
Ruby master - Bug #13423 (Closed): error in etc.gemspec
https://bugs.ruby-lang.org/issues/13423
2017-04-11T14:11:11Z
znz (Kazuhiro NISHIYAMA)
<p><code>git</code> コマンドがないと <code>make install</code> が <code>etc.gemspec</code> でエラーになります。</p>
<pre><code>Invalid gemspec in [/path/to/ruby/ext/etc/etc.gemspec]: No such file or directory - git
from ../tool/rbinstall.rb:889:in `<main>'
from ../tool/rbinstall.rb:889:in `each'
from ../tool/rbinstall.rb:892:in `block in <main>'
from ../tool/rbinstall.rb:763:in `block in <main>'
from ../tool/rbinstall.rb:775:in `install_default_gem'
from ../tool/rbinstall.rb:775:in `map'
../tool/rbinstall.rb:776:in `block in install_default_gem': invalid spec in /path/to/ruby/ext/etc/etc.gemspec (RuntimeError)
</code></pre>
Ruby master - Bug #13348 (Closed): win32/README.win32 のアイコンがリンク切れ
https://bugs.ruby-lang.org/issues/13348
2017-03-21T13:46:31Z
znz (Kazuhiro NISHIYAMA)
<p>@nifty の @homepage サービスが終了した影響で、win32/README.win32 に書いてある</p>
<pre><code>* ((<URL:http://homepage1.nifty.com/a_nakata/ruby/>)) or
((<icon itself|URL:http://homepage1.nifty.com/a_nakata/ruby/RubyIcon.ico>))
</code></pre>
<p>がリンク切れになってしまっているようです。</p>
Ruby master - Bug #13191 (Closed): sample/pty/shl.rb がうまく動かない
https://bugs.ruby-lang.org/issues/13191
2017-02-04T07:12:26Z
znz (Kazuhiro NISHIYAMA)
<p>sample/pty/shl.rb で c で起動したシェルを exit で終了した時に終了がうまく検知できないようです。</p>
<p>r57530 の修正がないと 1.8.6 でも動かなかったので、その修正をしたもので試したのですが、1.8.6 や 1.8.7 で試すとメインスレッドに <code>PTY::ChildExited</code> が発生して、<code>writer</code> メソッドの <code>STDIN.getc</code> が中断して rescue 節で <code>'Exit'</code> が返り、うまく終了が検知できました。</p>
<p>たぶんネイティブスレッドを使うようになった 1.9 以降(?)だと思うのですが、<code>PTY::ChildExited</code> が発生せず、<code>ps</code> コマンドで確認するとシェルが defunct になっています。</p>
<p>ここまでは調べられたのですが、ちょっと調べた限りでは、これが <code>sample/pty/shl.rb</code> のバグなのか <code>ext/pty</code> のバグなのかわかりませんでした。</p>
Ruby master - Bug #13114 (Closed): test failures since r57284
https://bugs.ruby-lang.org/issues/13114
2017-01-08T05:49:41Z
znz (Kazuhiro NISHIYAMA)
<p>r57284 の変更でいくつかのテストが失敗します。</p>
<p>最小の再現条件を絞り込もうとしたのですが、webrick/httpauth/basicauth だと再現するのに、個別の webrick/httpstatus と webrick/httpauth/authenticator だと再現しないなど、条件がよくわかりませんでした。</p>
<pre><code>% ruby -r webrick/httpauth/basicauth -e 'p WEBrick::HTTPStatus::ProxyAuthenticationRequired'
WEBrick::HTTPAuth::ProxyAuthenticator::AuthException
% ruby -r webrick/httpstatus -r webrick/httpauth/authenticator -e 'p WEBrick::HTTPStatus::ProxyAuthenticationRequired'
WEBrick::HTTPStatus::ProxyAuthenticationRequired
</code></pre>
Ruby master - Bug #13021 (Closed): `Zlib.gunzip` modifies argument String
https://bugs.ruby-lang.org/issues/13021
2016-12-10T02:00:33Z
znz (Kazuhiro NISHIYAMA)
<pre><code>% irb -r irb/completion --simple-prompt
>> RUBY_DESCRIPTION
=> "ruby 2.4.0dev (2016-12-10 trunk 57036) [x86_64-linux]"
>> require 'zlib'
=> true
>> gz=Zlib.gzip('test')
=> "\x1F\x8B\b\x00\xBF`KX\x00\x03+I-.\x01\x00\f~\x7F\xD8\x04\x00\x00\x00"
>> Zlib.gunzip(gz)
=> "test"
>> gz
=> "+I-.\x01\x00\f~\x7F\xD8\x04\x00\x00\x00"
</code></pre>
Ruby master - Bug #12942 (Third Party's Issue): about psych 2.2.0
https://bugs.ruby-lang.org/issues/12942
2016-11-15T15:14:20Z
znz (Kazuhiro NISHIYAMA)
<p>r56773 <a href="https://github.com/ruby/ruby/commit/4e70bae2bc9253fb91ae6c95bbe8e01e38d8d3df" class="external">https://github.com/ruby/ruby/commit/4e70bae2bc9253fb91ae6c95bbe8e01e38d8d3df</a> の ext/psych/psych.gemspec の差分には README.rdoc から README.md への変更が含まれていますが、 ext/psych 以下には README.rdoc も README.md もないようですが、良いのでしょうか?</p>
<p>typo 修正が戻ってしまっているっぽい変更も気になります。(occurrence - occurence, corresponding - correspoding, indentation - intendation, unknown - uknown)</p>
Ruby master - Bug #12850 (Closed): SEGV in C level backtrace information
https://bugs.ruby-lang.org/issues/12850
2016-10-18T13:41:27Z
znz (Kazuhiro NISHIYAMA)
<p>Ubuntu 16.04.1 LTS の環境で、r56445 の変更の影響で SEGV のテストの <code>C level backtrace information</code> の表示で SEGV します。</p>
<pre><code>% gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.2' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2)
% gdb -q --args ruby --disable-gems -v -e 'Process.kill :SEGV, $$'
Reading symbols from ruby...done.
(gdb) run
Starting program: /home/vagrant/build/ruby-git/ruby --disable-gems -v -e Process.kill\ :SEGV,\ \$\$
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7ff5700 (LWP 5839)]
ruby 2.4.0dev (2016-10-18 trunk 56445) [x86_64-linux]
Thread 1 "ruby" received signal SIGSEGV, Segmentation fault.
0x00007ffff7537757 in kill () at ../sysdeps/unix/syscall-template.S:84
84 ../sysdeps/unix/syscall-template.S: そのようなファイルやディレクトリはありません.
(gdb) c
Continuing.
-e:1: [BUG] Segmentation fault at 0x000384000016b9
ruby 2.4.0dev (2016-10-18 trunk 56445) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0003 p:---- s:0012 e:000011 CFUNC :kill
c:0002 p:0016 s:0006 e:000005 EVAL -e:1 [FINISH]
c:0001 p:0000 s:0003 E:001e60 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
-e:1:in `<main>'
-e:1:in `kill'
-- Machine register context ------------------------------------------------
RIP: 0x00007ffff7537757 RBP: 0x0000000000602f70 RSP: 0x00007fffffffd328
RAX: 0x0000000000000000 RBX: 0x0000000000603728 RCX: 0x00007ffff7537757
RDX: 0x0000000000000000 RDI: 0x00000000000016b9 RSI: 0x000000000000000b
R8: 0x0000000000603728 R9: 0x0000000000000005 R10: 0x000000000000022d
R11: 0x0000000000000206 R12: 0x0000000000000002 R13: 0x00000000000016b9
R14: 0x0000000000000001 R15: 0x0000000000000001 EFL: 0x0000000000000206
-- C level backtrace information -------------------------------------------
Thread 1 "ruby" received signal SIGSEGV, Segmentation fault.
parse_debug_line_cu (offset=0, lines=0x7657c0, obj=0x765cb0, debug_line=<synthetic pointer>,
traces=0x7ffff7dd31c0 <trace>, num_traces=18) at /home/vagrant/s/github.com/ruby/ruby/addr2line.c:291
291 while (*p) {
(gdb) p p
$1 = 0x8000f5f977f7 <error: Cannot access memory at address 0x8000f5f977f7>
(gdb)
</code></pre>
Ruby master - Bug #12815 (Closed): Integer#digits's error message different when base is Fixnum o...
https://bugs.ruby-lang.org/issues/12815
2016-10-06T12:33:05Z
znz (Kazuhiro NISHIYAMA)
<p>Is this intended?</p>
<pre><code>% ruby -ve '60.upto(65){|n| 1.digits(-(1<<n)) rescue p $! }'
ruby 2.4.0dev (2016-10-06 trunk 56364) [x86_64-linux]
#<ArgumentError: invalid radix -1152921504606846976>
#<ArgumentError: invalid radix -2305843009213693952>
#<ArgumentError: invalid radix -4611686018427387904>
#<ArgumentError: negative radix>
#<ArgumentError: negative radix>
#<ArgumentError: negative radix>
</code></pre>
Ruby master - Bug #12800 (Closed): YAMLStoreTest#test_thread_safe hang
https://bugs.ruby-lang.org/issues/12800
2016-09-29T13:39:32Z
znz (Kazuhiro NISHIYAMA)
<p><code>lib/yaml/store.rb</code> のテストがなかったので、<code>test/test_pstore.rb</code> を元に <code>test/yaml/test_store.rb</code> を作ってみたところ、<code>YAMLStoreTest#test_thread_safe</code> で止まってしまいました。</p>
<p>原因を調べてみたところ、</p>
<ul>
<li>
<code>PStore</code> は <code>def initialize(file, thread_safe = false)</code>
</li>
<li>
<code>YAML::Store</code> は <code>def initialize file_name, yaml_opts = {}</code>
</li>
</ul>
<p>という違いがあるのに <code>YAML::Store</code> で (引数なしもかっこもない) <code>super</code> を呼び出していて、意図せず <code>thread_safe</code> が真になっているからだとわかりました。</p>
<p>r33376 での変更からのようで、<code>yaml_opts</code> も使われなくなっていたので、そのあたりも含めて直しておきます。</p>
Ruby master - Bug #12793 (Closed): Warning.warn with non-string object
https://bugs.ruby-lang.org/issues/12793
2016-09-27T14:58:35Z
znz (Kazuhiro NISHIYAMA)
<p><code>Warning.warn</code> with non-string argument causes SEGV.<br>
For example, <code>Warning.warn nil</code>.</p>
Ruby master - Bug #12792 (Closed): cannot open https://bugs.jruby.org/4176
https://bugs.ruby-lang.org/issues/12792
2016-09-27T12:53:02Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://bugs.jruby.org/4176" class="external">https://bugs.jruby.org/4176</a> in r56260.<br>
But I cannot open it because connection refused.</p>
Ruby master - Bug #12785 (Closed): misc/test_ruby_mode.rb failed with emacs 25.1.1
https://bugs.ruby-lang.org/issues/12785
2016-09-22T14:22:11Z
znz (Kazuhiro NISHIYAMA)
<p>When emacs is 25.1.1, test/misc/test_ruby_mode.rb causes 8 failures.</p>
<pre><code>vagrant@archlinux:~/ruby/build$ make test-all TESTS=misc/test_ruby_mode.rb
CC = ccache gcc
LD = ld
LDSHARED = ccache gcc -shared
CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Werror=implicit-int -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=deprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -std=gnu99 -fPIC
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT
CPPFLAGS = -DRUBY_DEBUG_ENV -DARRAY_DEBUG -I. -I.ext/include/x86_64-linux -I../include -I.. -I../enc/unicode/9.0.0
DLDFLAGS = -Wl,-soname,libruby.so.2.4 -fstack-protector
SOLIBS = -lpthread -lgmp -ldl -lcrypt -lm
組み込み spec を使用しています。
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/lto-wrapper
ターゲット: x86_64-pc-linux-gnu
configure 設定: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release
スレッドモデル: posix
gcc バージョン 6.2.1 20160830 (GCC)
Run options: "--ruby=./miniruby -I../lib -I. -I.ext/common ../tool/runruby.rb --extout=.ext -- --disable-gems" --excludes-dir=../test/excludes --name=!/memory_leak/
# Running tests:
[1/9] TestRubyMode::TestIndent#test_array_after_paren_and_space = 0.08 s
1) Failure:
TestRubyMode::TestIndent#test_array_after_paren_and_space [/home/vagrant/ruby/test/misc/test_ruby_mode.rb:156]:
Expected /^Wrote / to match "Indenting region...\nIndenting region...done\n".
[2/9] TestRubyMode::TestIndent#test_array_literal = 0.08 s
2) Failure:
TestRubyMode::TestIndent#test_array_literal [/home/vagrant/ruby/test/misc/test_ruby_mode.rb:123]:
Expected /^Wrote / to match "Indenting region...\nIndenting region...done\n".
[3/9] TestRubyMode::TestIndent#test_begin_end = 0.08 s
3) Failure:
TestRubyMode::TestIndent#test_begin_end [/home/vagrant/ruby/test/misc/test_ruby_mode.rb:144]:
Expected /^Wrote / to match "Indenting region...\nIndenting region...done\n".
[4/9] TestRubyMode::TestIndent#test_expr_in_regexp = 0.08 s
4) Failure:
TestRubyMode::TestIndent#test_expr_in_regexp [/home/vagrant/ruby/test/misc/test_ruby_mode.rb:98]:
Expected /^Wrote / to match "Indenting region...\nIndenting region...done\n".
[5/9] TestRubyMode::TestIndent#test_keyword_label = 0.08 s
5) Failure:
TestRubyMode::TestIndent#test_keyword_label [/home/vagrant/ruby/test/misc/test_ruby_mode.rb:72]:
Expected /^Wrote / to match "Indenting region...\nIndenting region...done\n".
[6/9] TestRubyMode::TestIndent#test_method_with_question_mark = 0.08 s
6) Failure:
TestRubyMode::TestIndent#test_method_with_question_mark [/home/vagrant/ruby/test/misc/test_ruby_mode.rb:86]:
Expected /^Wrote / to match "Indenting region...\nIndenting region...done\n".
[7/9] TestRubyMode::TestIndent#test_simple = 0.08 s
7) Failure:
TestRubyMode::TestIndent#test_simple [/home/vagrant/ruby/test/misc/test_ruby_mode.rb:58]:
Expected /^Wrote / to match "Indenting region...\nIndenting region...done\n".
[9/9] TestRubyMode::TestIndent#test_spread_arguments = 0.08 s
8) Failure:
TestRubyMode::TestIndent#test_spread_arguments [/home/vagrant/ruby/test/misc/test_ruby_mode.rb:172]:
Expected /^Wrote / to match "Indenting region...\nIndenting region...done\n".
Finished tests in 0.670478s, 13.4233 tests/s, 64.1334 assertions/s.
9 tests, 43 assertions, 8 failures, 0 errors, 1 skips
ruby -v: ruby 2.4.0dev (2016-09-22 trunk 56204) [x86_64-linux]
make: *** [uncommon.mk:623: yes-test-all] エラー 8
vagrant@archlinux:~/ruby/build$ emacs --version
GNU Emacs 25.1.1
Copyright (C) 2016 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
</code></pre>
Ruby master - Bug #12777 (Closed): NoMethodError: undefined method `garbage_collect' for GC:Module
https://bugs.ruby-lang.org/issues/12777
2016-09-20T12:28:24Z
znz (Kazuhiro NISHIYAMA)
<p>RDoc says <code>GC.garbage_collect</code> is equal to <code>GC.start</code>. But <code>GC.garbage_collect</code> is a normal method. It is not a singleton method.<br>
So <code>GC.garbage_collect</code> raises <code>NoMethodError: undefined method `garbage_collect' for GC:Module</code>.<br>
Which is expected behavior?</p>
Ruby master - Bug #12773 (Closed): useless lines in lib/rss/rss.rb
https://bugs.ruby-lang.org/issues/12773
2016-09-18T10:31:12Z
znz (Kazuhiro NISHIYAMA)
<p><code>lib/rss/rss.rb</code> に</p>
<pre><code> attr = attr.id2name if attr.kind_of?(Integer)
</code></pre>
<p>という行が複数ありますが、<code>Fixnum#id2name</code> はもうないので、不要なのではないでしょうか。</p>
Ruby master - Bug #12764 (Closed): rubygems with multi default gem problem
https://bugs.ruby-lang.org/issues/12764
2016-09-15T13:31:24Z
znz (Kazuhiro NISHIYAMA)
<p>This issue may affect Ruby committers only.<br>
This does not probably affect released ruby.</p>
<p>With development ruby, <code>make install</code> many times.<br>
After them, default gems are duplicated when exists updated.<br>
And gem with old version in Gemfile does not work well.</p>
<p>Example:</p>
<pre><code>% gem list rdoc
*** LOCAL GEMS ***
rdoc (default: 5.0.0.beta2, default: 4.2.1)
% cat Gemfile
# frozen_string_literal: true
source "https://rubygems.org"
# gem "rails"
gem 'rdoc', '4.2.1'
% cat Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
rdoc (4.2.1)
PLATFORMS
ruby
DEPENDENCIES
rdoc (= 4.2.1)
BUNDLED WITH
1.13.0
% bundle exec ruby -r rdoc -e 'p RDoc::VERSION'
"5.0.0.beta2"
</code></pre>
<p>FYI: <a href="http://blog.n-z.jp/blog/2016-09-10-bundled-gem-and-default-gem.html" class="external">Difference of bundled gem and default gem (in Japanese)</a></p>
Ruby master - Bug #12762 (Closed): missing links in LEGAL
https://bugs.ruby-lang.org/issues/12762
2016-09-14T12:50:32Z
znz (Kazuhiro NISHIYAMA)
<ul>
<li>LEGAL の Oniguruma の節にある URL が以下の3つ全てリンク切れのようです。</li>
<li>random.c の <a href="http://www.math.keio.ac.jp/matumoto/emt.html" class="external">http://www.math.keio.ac.jp/matumoto/emt.html</a> もないようです。</li>
<li>ext/win32ole/win32ole.c の <a href="http://www.ActiveWare.com" class="external">http://www.ActiveWare.com</a> もないようです。</li>
</ul>
Ruby master - Bug #12736 (Closed): `make install` says `fatal: Not a git repository (or any of th...
https://bugs.ruby-lang.org/issues/12736
2016-09-07T12:29:48Z
znz (Kazuhiro NISHIYAMA)
<p><code>make install</code> の時に <code>fatal: Not a git repository (or any of the parent directories): .git</code> というメッセージが2回出ます。</p>
<p>ext/psych/psych.gemspec と lib/rdoc/rdoc.gemspec の</p>
<pre><code>s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
</code></pre>
<p>が原因のようです。</p>
Ruby master - Bug #12714 (Closed): make で $(topdir)/.ext/gems が作成される
https://bugs.ruby-lang.org/issues/12714
2016-08-30T12:40:03Z
znz (Kazuhiro NISHIYAMA)
<p>現在の trunk は make したとき、ビルドディレクトリに <code>$(topdir)/.ext/gems</code> というディレクトリが作成されるようです。</p>
<p>git bisect で調べてみたところ、r55950 から発生しているようです。</p>
Ruby master - Bug #12541 (Closed): test failure with `umask 027`
https://bugs.ruby-lang.org/issues/12541
2016-07-02T06:27:28Z
znz (Kazuhiro NISHIYAMA)
<p><code>ruby -e 'system("make", "test-all", "TESTS=fileutils/test_fileutils.rb", umask: 027)'</code> などのように <code>umask 027</code> の環境で実行すると TestFileUtils#test_cp_preserve_permissions が failure になります。</p>
<pre><code>[31/91] TestFileUtils#test_cp_preserve_permissions = 0.00 s
1) Failure:
TestFileUtils#test_cp_preserve_permissions [/home/vagrant/ruby/test/fileutils/test_fileutils.rb:286]:
File modes expected to be equal:
<0755>: "tmp/cptmp"
<0750>: "tmp/cptmp2"
</code></pre>
Ruby master - Bug #12540 (Closed): test failures when SHARABLE_MIDDLE_SUBSTRING=1
https://bugs.ruby-lang.org/issues/12540
2016-07-02T06:23:27Z
znz (Kazuhiro NISHIYAMA)
<p>SHARABLE_MIDDLE_SUBSTRING=1 でビルドすると Test_StringCStr#test_wchar_lstrip!,Test_StringCStr#test_wchar_rstrip! が失敗します。</p>
<pre><code>[16604/16757] Test_StringCStr#test_wchar_lstrip! = 0.00 s
3) Failure:
Test_StringCStr#test_wchar_lstrip! [/home/vagrant/ruby/test/-ext-/string/test_cstr.rb:81]:
Expected {#<Encoding:UTF-16BE>=>"a",
#<Encoding:UTF-16LE>=>"a",
#<Encoding:UTF-32BE>=>"a",
#<Encoding:UTF-32LE>=>"a"} to be empty.
[16606/16757] Test_StringCStr#test_wchar_rstrip! = 0.00 s
4) Failure:
Test_StringCStr#test_wchar_rstrip! [/home/vagrant/ruby/test/-ext-/string/test_cstr.rb:85]:
Expected {#<Encoding:UTF-16BE>=>" ",
#<Encoding:UTF-16LE>=>" ",
#<Encoding:UTF-32BE>=>" ",
#<Encoding:UTF-32LE>=>" "} to be empty.
</code></pre>
<p>原因を調べてみたところ、lstrip!,rstrip! だけ !SHARABLE_MIDDLE_SUBSTRING で TERM_FILL をくくっているからのようでした。</p>
<p>調べていて思ったのですが、個別に TERM_FILL を呼ぶかどうかを分岐するよりも、 SHARABLE_MIDDLE_SUBSTRING の値によって TERM_FILL 自体の定義を変更するようにした方が良いのではないでしょうか?</p>
Ruby master - Bug #12487 (Closed): -12345.digits(7) behavior
https://bugs.ruby-lang.org/issues/12487
2016-06-14T15:19:50Z
znz (Kazuhiro NISHIYAMA)
<p>rdoc of Integer#digits says <code>-12345.digits(7) #=> [4, 6, 6, 0, 5]</code>, but it raises <code>Math::DomainError: out of domain</code>.<br>
Which is expected behavior?</p>
Ruby master - Bug #12475 (Closed): SHARABLE_MIDDLE_SUBSTRING=1のとき、環境変数が正しく設定されない
https://bugs.ruby-lang.org/issues/12475
2016-06-09T14:11:28Z
znz (Kazuhiro NISHIYAMA)
<p><code>-DSHARABLE_MIDDLE_SUBSTRING=1</code> でビルドすると以下の failures がでます。</p>
<pre><code>[15969/16628] TestTimeTZ#test_gen_right_America_Los_Angeles_91 = 0.00 s
3) Failure:
TestTimeTZ#test_gen_right_America_Los_Angeles_91 [/home/vagrant/ruby/test/ruby/test_time_tz.rb:257]:
TZ=right/America/Los_Angeles Time.utc(1972, 6, 30, 23, 59, 60).
<"1972-06-30 23:59:60 UTC"> expected but was
<"1972-07-01 00:00:00 UTC">.
[15970/16628] TestTimeTZ#test_gen_right_America_Los_Angeles_92 = 0.00 s
4) Failure:
TestTimeTZ#test_gen_right_America_Los_Angeles_92 [/home/vagrant/ruby/test/ruby/test_time_tz.rb:257]:
TZ=right/America/Los_Angeles Time.utc(2008, 12, 31, 23, 59, 60).
<"2008-12-31 23:59:60 UTC"> expected but was
<"2009-01-01 00:00:00 UTC">.
[15971/16628] TestTimeTZ#test_gen_right_America_Los_Angeles_95 = 0.00 s
5) Failure:
TestTimeTZ#test_gen_right_America_Los_Angeles_95 [/home/vagrant/ruby/test/ruby/test_time_tz.rb:277]:
TZ=right/America/Los_Angeles Time.local(1972, 6, 30, 16, 59, 60).
<"1972-06-30 16:59:60 -0700"> expected but was
<"1972-06-30 17:00:00 +0000">.
[15972/16628] TestTimeTZ#test_gen_right_America_Los_Angeles_96 = 0.00 s
6) Failure:
TestTimeTZ#test_gen_right_America_Los_Angeles_96 [/home/vagrant/ruby/test/ruby/test_time_tz.rb:277]:
TZ=right/America/Los_Angeles Time.local(2008, 12, 31, 15, 59, 60).
<"2008-12-31 15:59:60 -0800"> expected but was
<"2008-12-31 16:00:00 +0000">.
</code></pre>
<p>原因を調べてみたところ、<code>ENV.[]=</code> で環境変数が正しく設定されていませんでした。</p>
<pre><code>$ irb -r irb/completion --simple-prompt
>> ENV["TZ"]="right/America/Los_Angeles.".chop
=> "right/America/Los_Angeles"
>> Time.utc(1972, 6, 30, 23, 59, 60)
=> 1972-07-01 00:00:00 UTC
>> ENV["TZ"]
=> "right/America/Los_Angeles."
>>
</code></pre>
Ruby master - Bug #12407 (Rejected): 2 failures of TestMkmf::TestConvertible
https://bugs.ruby-lang.org/issues/12407
2016-05-20T14:30:17Z
znz (Kazuhiro NISHIYAMA)
<p>jessie の clang でビルドすると <code>TestMkmf::TestConvertible#test_typeof_builtin</code> と <code>TestMkmf::TestConvertible#test_typeof_typedef</code> で failure になります。</p>
<pre><code>$ dpkg -l clang | grep ^ii
ii clang 1:3.5-25 amd64 C, C++ and Objective-C compiler (LLVM based)
$ make test-all TESTS="mkmf/test_convertible.rb" >log.txt 2>&1
</code></pre>
Ruby master - Bug #12339 (Closed): result of 123456789 ** -2 in doc
https://bugs.ruby-lang.org/issues/12339
2016-05-02T10:47:53Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://github.com/ruby/ruby/blob/c353ec0c9e8e941f49910a51f7dc10cf3d3cdd17/numeric.c#L3647" class="external">https://github.com/ruby/ruby/blob/c353ec0c9e8e941f49910a51f7dc10cf3d3cdd17/numeric.c#L3647</a><br>
の <code>Integer#**</code> の rdoc で</p>
<pre><code> * 123456789 ** -2 #=> 6.5610001194102e-17
</code></pre>
<p>となっていますが、実際に試してみると <code>(1/15241578750190521)</code> になります。<br>
どちらが正しいのでしょうか?</p>
<pre><code>% ruby -ve 'p 123456789 ** -2'
ruby 2.4.0dev (2016-05-02 trunk 54882) [x86_64-darwin14]
(1/15241578750190521)
</code></pre>
Ruby master - Bug #11855 (Closed): CGI.escapeHTML and taint/frozen
https://bugs.ruby-lang.org/issues/11855
2015-12-21T14:22:31Z
znz (Kazuhiro NISHIYAMA)
<p>taint フラグや frozen の扱いが変わってしまっているようです。</p>
<pre><code>% ruby -v -r cgi -e 'p CGI.escapeHTML("".taint).tainted?'
ruby 2.3.0dev (2015-12-21 trunk 53230) [x86_64-darwin14]
true
% ruby -v -r cgi -e 'p CGI.escapeHTML("&".taint).tainted?'
ruby 2.3.0dev (2015-12-21 trunk 53230) [x86_64-darwin14]
false
% ruby -v -r cgi -e 'p CGI.escapeHTML("".freeze).frozen?'
ruby 2.3.0dev (2015-12-21 trunk 53230) [x86_64-darwin14]
true
% ruby -v -r cgi -e 'p CGI.escapeHTML("&".freeze).frozen?'
ruby 2.3.0dev (2015-12-21 trunk 53230) [x86_64-darwin14]
false
</code></pre>
<pre><code>% ruby -v -r cgi -e 'p CGI.escapeHTML("".taint).tainted?'
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin14]
true
% ruby -v -r cgi -e 'p CGI.escapeHTML("&".taint).tainted?'
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin14]
true
% ruby -v -r cgi -e 'p CGI.escapeHTML("".freeze).frozen?'
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin14]
false
% ruby -v -r cgi -e 'p CGI.escapeHTML("&".freeze).frozen?'
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin14]
false
</code></pre>
Ruby master - Bug #11730 (Closed): read_nonblock's call-seq missing options
https://bugs.ruby-lang.org/issues/11730
2015-11-22T08:32:49Z
znz (Kazuhiro NISHIYAMA)
<p><code>IO#write_nonblock</code> call-seq has <code>[, options]</code>, but <code>IO#read_nonblock</code> does not.</p>
<p>In prelude.rb:</p>
<pre><code> # call-seq:
# ios.read_nonblock(maxlen) -> string
# ios.read_nonblock(maxlen, outbuf) -> outbuf
</code></pre>
<pre><code> # call-seq:
# ios.write_nonblock(string) -> integer
# ios.write_nonblock(string [, options]) -> integer
</code></pre>
Ruby master - Bug #11608 (Closed): test -t without fd
https://bugs.ruby-lang.org/issues/11608
2015-10-20T13:30:52Z
znz (Kazuhiro NISHIYAMA)
<p>r52202 で fd 指定なしの test -t を使っていますが、<br>
<a href="http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html" class="external">http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html</a><br>
の RATIONALE で</p>
<blockquote>
<p>The -t file_descriptor primary is shown with a mandatory argument because the grammar is ambiguous if it can be omitted. Historical implementations have allowed it to be omitted, providing a default of 1.</p>
</blockquote>
<p>と書かれているように省略せずに指定すべきではないでしょうか。</p>
Ruby master - Bug #11255 (Closed): dev系パッケージが入っていないときのテストのエラーが変
https://bugs.ruby-lang.org/issues/11255
2015-06-12T13:02:31Z
znz (Kazuhiro NISHIYAMA)
<p>dev 系パッケージが入っていないときの拡張ライブラリが require できるかどうかのテストのエラーが変です。</p>
<pre><code> 1) Error:
TestExtLibs#test_existence_of_fiddle:
ArgumentError: invalid byte sequence in US-ASCII
.../test/lib/test/unit/assertions.rb:455:in `sub'
.../test/lib/test/unit/assertions.rb:455:in `block (2 levels) in message'
.../test/lib/test/unit/assertions.rb:455:in `map'
.../test/lib/test/unit/assertions.rb:455:in `block in message'
</code></pre>
<p>mkmf.log に日本語が入っているからのようで、</p>
<pre><code>diff --git a/test/ruby/test_extlibs.rb b/test/ruby/test_extlibs.rb
index 71dcf2b..995baa0 100644
--- a/test/ruby/test_extlibs.rb
+++ b/test/ruby/test_extlibs.rb
@@ -13,7 +13,7 @@ class TestExtLibs < Test::Unit::TestCase
log = #{log.dump}
msg = proc {
"extension library `#{ext}' is not found#{add_msg}\n" <<
- (File.exist?(log) ? File.read(log) : "\#{log} not found")
+ (File.exist?(log) ? File.binread(log) : "\#{log} not found")
}
assert_nothing_raised(msg) do
require "#{ext}"
</code></pre>
<p>という変更で想定通りに見える failure になおります。</p>
Ruby master - Bug #10890 (Closed): revision.h が空になる
https://bugs.ruby-lang.org/issues/10890
2015-02-23T12:26:17Z
znz (Kazuhiro NISHIYAMA)
<p>Ubuntu 12.04 LTS のように git が古い環境だと revision.h が空になってしまいます。<br>
原因を調べてみたところ -C オプションに対応していないからのようです。</p>
<pre><code>% git --version
git version 1.7.9.5
% ruby -vd --disable=gems tool/file2lastrev.rb --revision.h .
ruby 2.3.0dev (2015-02-23) [x86_64-linux]
[["git", "-C", ".", "log", "-n1", "--date=iso", "--grep=^ *git-svn-id: .*@[0-9][0-9]*"]]
Unknown option: -C
usage: git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
[-c name=value] [--help]
<command> [<args>]
(略)
Exception `VCS::NotFoundError' at /home/kazu/z/wc/CI/ruby/tool/vcs.rb:96 - last revision not found
file2lastrev.rb: last revision not found
</code></pre>
<p>そのままだと ruby -d でも何も出なかったので以下の変更をして試しました。</p>
<pre><code>% git diff
diff --git a/tool/vcs.rb b/tool/vcs.rb
index 9d11b3b..29bcc95 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -81,7 +81,7 @@ class VCS
end
last, changed, modified, *rest = (
begin
- if NullDevice
+ if !$DEBUG && NullDevice
save_stderr = STDERR.dup
STDERR.reopen NullDevice, 'w'
end
</code></pre>
Ruby master - Bug #10276 (Rejected): nil/true/false に singleton メソッドを定義できてしまう
https://bugs.ruby-lang.org/issues/10276
2014-09-21T09:37:02Z
znz (Kazuhiro NISHIYAMA)
<p>nil/true/false が frozen object なのに singleton メソッドを定義できてしまいます。</p>
<pre><code>% cat /tmp/f.rb
def d(o)
p o.frozen?
def o.m; end
rescue
p [o, $!]
end
d(:sym)
d(1)
d(nil)
d(true)
d(false)
d(Object.new.freeze)
% ruby -v /tmp/f.rb
ruby 2.2.0dev (2014-09-21 trunk 47672) [x86_64-linux]
true
[:sym, #<TypeError: can't define singleton>]
true
[1, #<TypeError: can't define singleton>]
true
true
true
true
[#<Object:0x00000002706730>, #<RuntimeError: can't modify frozen object>]
</code></pre>
Ruby master - Bug #9833 (Closed): OpenSSL::X509::Certificate#inspect がわかりにくくなっている
https://bugs.ruby-lang.org/issues/9833
2014-05-13T09:01:43Z
znz (Kazuhiro NISHIYAMA)
<p>SSL/TLS の証明書の簡易的なチェックに OpenSSL::X509::Certificate#inspect を便利に使っていたのですが、最近の ruby だと subject などに内容が出なくなってわかりにくくなっているのですが、以前のように内容が出た方が良いと思うのですが、どうでしょうか。</p>
<pre><code>% cat inspect_cert.rb
#!/usr/bin/env ruby
require 'openssl'
require 'socket'
host = ARGV.shift
port = ARGV.shift.to_i
sock = TCPSocket.open(host, port)
ssl = OpenSSL::SSL::SSLSocket.new(sock)
ssl.connect
p ssl.peer_cert
% ruby1.9.1 -v inspect_cert.rb www.ruby-lang.org 443
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
#<OpenSSL::X509::Certificate subject=/OU=Domain Control Validated/CN=*.ruby-lang.org, issuer=/C=BE/O=GlobalSign nv-sa/CN=GlobalSign Domain Validation CA - SHA256 - G2, serial=1492412345881966875081918063955459968936780, not_before=2014-04-12 01:22:02 UTC, not_after=2014-08-25 05:22:02 UTC>
% ruby -v inspect_cert.rb www.ruby-lang.org 443
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-linux]
#<OpenSSL::X509::Certificate subject=#<OpenSSL::X509::Name:0x007f9b7960b230>, issuer=#<OpenSSL::X509::Name:0x007f9b7960b1b8>, serial=#<OpenSSL::BN:0x007f9b7960b140>, not_before=2014-04-12 01:22:02 UTC, not_after=2014-08-25 05:22:02 UTC>
</code></pre>
Ruby master - Bug #9773 (Closed): broken link in man/ruby.1
https://bugs.ruby-lang.org/issues/9773
2014-04-24T12:33:10Z
znz (Kazuhiro NISHIYAMA)
<p>Two broken link <code>https://github.com/languages/Ruby</code> exist in <code>./man/ruby.1</code>.<br>
I do not know what it was, and I can't replace newer URL.</p>
Ruby master - Bug #9693 (Rejected): \x{} in regexp
https://bugs.ruby-lang.org/issues/9693
2014-04-02T00:49:08Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://github.com/rurema/doctree/issues/80" class="external">https://github.com/rurema/doctree/issues/80</a> の話です。</p>
<p><code>regparse.c</code> の <code>OnigSyntaxRuby</code> では <code>ONIG_SYN_OP_ESC_X_BRACE_HEX8</code> が有効になっていて、使えることを意図しているように見えるのですが、正規表現リテラルだと parser が通してくれなくて <code>syntax error, unexpected '{', expecting end-of-input</code> になるようです。</p>
<p><code>Regexp.new</code> に直接渡しても <code>re.c</code> の中で <code>invalid hex escape</code> になるので使えないようです。</p>
Ruby master - Bug #9268 (Closed): dead link to raa
https://bugs.ruby-lang.org/issues/9268
2013-12-20T23:48:09Z
znz (Kazuhiro NISHIYAMA)
<p>In lib/net/smtp.rb:</p>
<a name="-What-is-This-Library-NOT"></a>
<h1 >== What is This Library NOT?<a href="#-What-is-This-Library-NOT" class="wiki-anchor">¶</a></h1>
<h1></h1>
<a name="This-library-does-NOT-provide-functions-to-compose-internet-mails"></a>
<h1 >This library does NOT provide functions to compose internet mails.<a href="#This-library-does-NOT-provide-functions-to-compose-internet-mails" class="wiki-anchor">¶</a></h1>
<a name="You-must-create-them-by-yourself-If-you-want-better-mail-support"></a>
<h1 >You must create them by yourself. If you want better mail support,<a href="#You-must-create-them-by-yourself-If-you-want-better-mail-support" class="wiki-anchor">¶</a></h1>
<a name="try-RubyMail-or-TMail-You-can-get-both-libraries-from-RAA"></a>
<h1 >try RubyMail or TMail. You can get both libraries from RAA.<a href="#try-RubyMail-or-TMail-You-can-get-both-libraries-from-RAA" class="wiki-anchor">¶</a></h1>
<a name="httpwwwruby-langorgenraahtml"></a>
<h1 >(<a href="http://www.ruby-lang.org/en/raa.html" class="external">http://www.ruby-lang.org/en/raa.html</a>)<a href="#httpwwwruby-langorgenraahtml" class="wiki-anchor">¶</a></h1>
<p>and example in lib/open-uri.rb:</p>
<a name="openhttpwwwruby-langorgenraahtml-proxy-gt-nil-f"></a>
<h1 >open("<a href="http://www.ruby-lang.org/en/raa.html" class="external">http://www.ruby-lang.org/en/raa.html</a>", :proxy => nil) {|f|<a href="#openhttpwwwruby-langorgenraahtml-proxy-gt-nil-f" class="wiki-anchor">¶</a></h1>
<a name="-"></a>
<h1 ># ...<a href="#-" class="wiki-anchor">¶</a></h1>
<a name=""></a>
<h1 >}<a href="#" class="wiki-anchor">¶</a></h1>
Ruby master - Bug #9266 (Closed): dead links to rubyforge
https://bugs.ruby-lang.org/issues/9266
2013-12-20T23:41:42Z
znz (Kazuhiro NISHIYAMA)
<p>For example,<br>
<a href="http://rake.rubyforge.org/doc/release_notes/rake-10_1_0_rdoc.html" class="external">http://rake.rubyforge.org/doc/release_notes/rake-10_1_0_rdoc.html</a><br>
<a href="http://rake.rubyforge.org/doc/release_notes/rake-10_0_3_rdoc.html" class="external">http://rake.rubyforge.org/doc/release_notes/rake-10_0_3_rdoc.html</a><br>
are in NEWS, but they can not open.</p>
Ruby master - Bug #9029 (Closed): doc of ARGF.gets
https://bugs.ruby-lang.org/issues/9029
2013-10-17T14:54:27Z
znz (Kazuhiro NISHIYAMA)
<p>rdoc of ARGF.gets says ARGF.gets return string only, but it may return nil.</p>
<p>doc of rb_f_gets:</p>
<ul>
<li>call-seq:</li>
<li>
<pre><code>gets(sep=$/) -> string or nil
</code></pre>
</li>
<li>
<pre><code>gets(limit) -> string or nil
</code></pre>
</li>
<li>
<pre><code>gets(sep,limit) -> string or nil
</code></pre>
</li>
</ul>
<p>doc of argf_gets:</p>
<ul>
<li>call-seq:</li>
<li>
<pre><code>ARGF.gets(sep=$/) -> string
</code></pre>
</li>
<li>
<pre><code>ARGF.gets(limit) -> string
</code></pre>
</li>
<li>
<pre><code>ARGF.gets(sep, limit) -> string
</code></pre>
</li>
</ul>
Ruby master - Bug #8819 (Closed): ChangeLog includes non us-ascii character
https://bugs.ruby-lang.org/issues/8819
2013-08-26T10:13:43Z
znz (Kazuhiro NISHIYAMA)
<p>ChangeLog should be us-ascii because local variables for emacs set "coding: us-ascii".</p>
<p>% ruby -e 'ARGF.each_line{|line|p line.b unless line.force_encoding("us-ascii").valid_encoding?}' ChangeLog<br>
"\t Patches by David Rodr\xC3\xADguez <a href="/issues/8802">[ruby-core:56734]</a> [Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Minor improvements in socket extension docs (Closed)" href="https://bugs.ruby-lang.org/issues/8802">#8802</a>]\n"</p>
Ruby master - Bug #8712 (Closed): Couldn't find file to include 'sample/curses/*.rb'
https://bugs.ruby-lang.org/issues/8712
2013-07-31T23:17:38Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
When builddir is not srcdir, failed to include from curses.c.</p>
<p>Generating RDoc documentation<br>
Parsing sources...<br>
Couldn't find file to include 'sample/curses/hello.rb' from .../ruby/ext/curses/curses.c<br>
Couldn't find file to include 'sample/curses/rain.rb' from .../ruby/ext/curses/curses.c<br>
Couldn't find file to include 'sample/curses/mouse.rb' from .../ruby/ext/curses/curses.c<br>
=end</p>
Ruby master - Bug #8518 (Closed): assertion failed in rb_ary_sort_bang
https://bugs.ruby-lang.org/issues/8518
2013-06-12T12:58:24Z
znz (Kazuhiro NISHIYAMA)
<p>-DARRAY_DEBUG の続きです。</p>
<p>test/ruby/test_array.rb の test_sort! の以下に相当する部分で assertion failed になります。</p>
<p>% ./miniruby -e 'a=Array[4, 1, 2, 3]; a.sort! {|m, n| a.replace([9, 8, 7]); m <=> n }'<br>
miniruby: .../ruby/array.c:2336: rb_ary_sort_bang: Assertion `!(((!((!(((VALUE)((ary)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((ary)) & ~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((ary)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)(((ary))))->flags&(((((VALUE)1)<<(12+2))))):0) || !((!(((VALUE)((ary)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((ary)) & ~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((ary)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)(((ary))))->flags&(((((VALUE)1)<<(12+1))))):0)) ? (void) (0) : __assert_fail ("!((!(((VALUE)((ary)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((ary)) & ~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((ary)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)(((ary))))->flags&(((((VALUE)1)<<(12+2))))):0) || !((!(((VALUE)((ary)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((ary)) & ~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((ary)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)(((ary))))->flags&(((((VALUE)1)<<(12+1))))):0)", "/home/kazu/z/wc/CI/ruby/array.c", 2336, <strong>PRETTY_FUNCTION</strong>)), ((!(((VALUE)((ary)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((ary)) & ~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((ary)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)(((ary))))->flags&(((((VALUE)1)<<(12+1))))):0)!=0)' failed.</p>
<p>なぜか行番号がずれていて 2336 行目は以下の if 文の行ですが、その下の ary の方がひっかかっているようです。</p>
<pre><code> assert(!ARY_EMBED_P(tmp));
if (ARY_HEAP_PTR(ary) == ARY_HEAP_PTR(tmp)) {
assert(!ARY_EMBED_P(ary));
</code></pre>
Ruby master - Bug #8510 (Closed): assertion failed in ary_resize_capa
https://bugs.ruby-lang.org/issues/8510
2013-06-11T09:47:22Z
znz (Kazuhiro NISHIYAMA)
<p>-DARRAY_DEBUG を付けていると enc.mk のあたりで make が通りません。</p>
<p>generating enc.mk<br>
miniruby: .../ruby/array.c:153: ary_resize_capa: Assertion `!(!!((!(((VALUE)(ary) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(ary) & ~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(ary))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)(ary))->flags&((((VALUE)1)<<11))):((((int)(long)(ary))&RUBY_FIXNUM_FLAG)||((((int)(long)(ary))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG))))' failed.<br>
Aborted (core dumped)</p>
<p>原因を調べてみたところ、 ary_make_shared で</p>
<pre><code>else if (OBJ_FROZEN(ary)) {
ary_resize_capa(ary, ARY_HEAP_LEN(ary));
</code></pre>
<p>という条件で ary_resize_capa を呼び出しているのに、ary_resize_capa の中に</p>
<pre><code>assert(!OBJ_FROZEN(ary));
</code></pre>
<p>があるからのようです。</p>
Ruby master - Bug #8084 (Closed): ext/tk/MANUAL_tcltklib.eucj is utf-8
https://bugs.ruby-lang.org/issues/8084
2013-03-14T00:19:20Z
znz (Kazuhiro NISHIYAMA)
<p>ext/tk/MANUAL_tcltklib.eucj は中身が UTF-8 に変更されているので、ファイル名も変更した方が良いのではないでしょうか?</p>
Ruby master - Bug #8010 (Closed): Enumerator#with_index(large_number)
https://bugs.ruby-lang.org/issues/8010
2013-03-04T20:18:03Z
znz (Kazuhiro NISHIYAMA)
<p>Enumerator#with_index の引数で大きな数を指定するとマイナスになったり例外になったりするのはバグでしょうか?</p>
<p>% ruby -ve 'p 3.times.with_index(1<<61).to_a'<br>
ruby 2.1.0dev (2013-03-04 trunk 39580) [x86_64-linux]<br>
[[0, 2305843009213693952], [1, 2305843009213693953], [2, 2305843009213693954]]<br>
% ruby -ve 'p 3.times.with_index(1<<62).to_a'<br>
ruby 2.1.0dev (2013-03-04 trunk 39580) [x86_64-linux]<br>
[[0, -4611686018427387904], [1, -4611686018427387903], [2, -4611686018427387902]]<br>
% ruby -ve 'p 3.times.with_index(1<<63).to_a'<br>
ruby 2.1.0dev (2013-03-04 trunk 39580) [x86_64-linux]<br>
-e:1:in <code>with_index': bignum too big to convert into </code>long' (RangeError)<br>
from -e:1:in <code>each' from -e:1:in </code>to_a'<br>
from -e:1:in `'</p>
Ruby master - Bug #7770 (Closed): rand(range) is not document
https://bugs.ruby-lang.org/issues/7770
2013-02-01T23:52:23Z
znz (Kazuhiro NISHIYAMA)
<p>Random#rand(range) is written in RDoc of random_rand, but rand(range) is not written in RDoc of rb_f_rand.</p>
Ruby master - Bug #7760 (Closed): "-\n2000-01-02 03:04:05".to_yaml raise ArgumentError
https://bugs.ruby-lang.org/issues/7760
2013-01-31T15:59:34Z
znz (Kazuhiro NISHIYAMA)
<p>1.9.3's psych raises ArgumentError.<br>
2.0.0's psych doesn't.</p>
<p>% ruby -v -r yaml -e '"-\n2000-01-02 03:04:05".to_yaml'<br>
ruby 1.9.3p374 (2013-01-15 revision 38858) [x86_64-darwin12.2.0]<br>
/Users/kazu/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/psych/scalar_scanner.rb:111:in <code>utc': argument out of range (ArgumentError) from /Users/kazu/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/psych/scalar_scanner.rb:111:in </code>parse_time'<br>
from /Users/kazu/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/psych/scalar_scanner.rb:48:in <code>tokenize' from /Users/kazu/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:242:in </code>visit_String'<br>
from /Users/kazu/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:103:in <code>accept' from /Users/kazu/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:67:in </code>push'<br>
from /Users/kazu/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/psych.rb:242:in <code>dump' from /Users/kazu/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/psych/core_ext.rb:14:in </code>psych_to_yaml'<br>
from -e:1:in `'</p>
Ruby master - Bug #7579 (Closed): TestGemExtCmakeBuilder#test_self_build failed in ja_JP.UTF-8 lo...
https://bugs.ruby-lang.org/issues/7579
2012-12-17T07:25:00Z
znz (Kazuhiro NISHIYAMA)
<p>TestGemExtCmakeBuilder#test_self_build failed in ja_JP.UTF-8 locale.<br>
It should set locale C before invoking make.<br>
Attached patch will revolve this issue.</p>
<ol>
<li>Failure:<br>
test_self_build(TestGemExtCmakeBuilder) [.../ruby/test/rubygems/test_gem_ext_cmake_builder.rb:46]:<br>
--- expected<br>
+++ actual<br>
@@ -1 +1,3 @@<br>
-""<br>
+"make[1]: ディレクトリ <code>.../tmp/test/test_rubygems_16184/ext' に入ります +make[1]: ディレクトリ </code>.../tmp/test/test_rubygems_16184/ext' から出ます<br>
+"</li>
</ol>
Ruby master - Bug #7244 (Closed): ArgumentError of refine
https://bugs.ruby-lang.org/issues/7244
2012-10-30T22:02:31Z
znz (Kazuhiro NISHIYAMA)
<p>refine は 1 個しか引数をとらないはずなのにブロックを渡さずに引数 1 個で呼び出すと (0 for 1..3) という ArgumentError になります。</p>
<p>% ruby -v<br>
ruby 2.0.0dev (2012-10-30 trunk 37389) [x86_64-linux]<br>
% ruby -e 'Class.new{|c|refine}'<br>
-e:1:in <code>refine': wrong number of arguments (0 for 1) (ArgumentError) from -e:1:in </code>block in '<br>
from -e:1:in <code>initialize' from -e:1:in </code>new'<br>
from -e:1:in <code><main>' % ruby -e 'Class.new{|c|refine c}' -e:1:in </code>refine': wrong number of arguments (0 for 1..3) (ArgumentError)<br>
from -e:1:in <code>block in <main>' from -e:1:in </code>initialize'<br>
from -e:1:in <code>new' from -e:1:in </code>'<br>
%</p>
Ruby master - Bug #7197 (Closed): Error: test_tls_v1_2(OpenSSL::TestSSL)
https://bugs.ruby-lang.org/issues/7197
2012-10-20T13:30:51Z
znz (Kazuhiro NISHIYAMA)
<p>Ubuntu 12.04.1 LTS 64-bit の環境で以下のエラーが出ています。</p>
<ol start="2">
<li>Error:<br>
test_tls_v1_2(OpenSSL::TestSSL):<br>
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=unknown state: tlsv1 alert protocol version<br>
.../test/openssl/test_ssl.rb:607:in <code>connect' .../test/openssl/test_ssl.rb:607:in </code>server_connect'<br>
.../test/openssl/test_ssl.rb:468:in <code>block in test_tls_v1_2' .../test/openssl/utils.rb:293:in </code>call'<br>
.../test/openssl/utils.rb:293:in <code>start_server' .../test/openssl/test_ssl.rb:593:in </code>start_server_version'<br>
.../test/openssl/test_ssl.rb:467:in `test_tls_v1_2'</li>
</ol>
<p>OpenSSL のバージョンは以下の通りです。</p>
<p>% openssl version<br>
OpenSSL 1.0.1 14 Mar 2012<br>
% dpkg -l openssl | grep '^ii'<br>
ii openssl 1.0.1-4ubuntu5.5 Secure Socket Layer (SSL) binary and related cryptographic tools<br>
%</p>
Ruby master - Bug #6774 (Closed): test failures when *_proxy already set
https://bugs.ruby-lang.org/issues/6774
2012-07-23T01:39:53Z
znz (Kazuhiro NISHIYAMA)
<p>他の組み合わせでもおきますが、 proxy 関連の環境変数が設定されていると test_find_proxy が失敗します。</p>
<p>% env -u http_proxy -u https_proxy ftp_proxy= ruby -v test/uri/test_generic.rb<br>
ruby 2.0.0dev (2012-07-23 trunk 36494) [x86_64-linux]<br>
Run options:</p>
<a name="Running-tests"></a>
<h1 >Running tests:<a href="#Running-tests" class="wiki-anchor">¶</a></h1>
<p>[ 3/12] URI::TestGeneric#test_find_proxy = 0.00 s</p>
<ol>
<li>Failure:<br>
test_find_proxy(URI::TestGeneric) [test/uri/test_generic.rb:740]:<br>
Expected #<URI::Generic:0x007fbdb6c16e40 URL:> to be nil.</li>
</ol>
<p>Finished tests in 0.015542s, 772.1030 tests/s, 19624.2844 assertions/s.<br>
12 tests, 305 assertions, 1 failures, 0 errors, 0 skips</p>
Ruby master - Bug #6657 (Closed): IRB.fail
https://bugs.ruby-lang.org/issues/6657
2012-06-27T23:27:27Z
znz (Kazuhiro NISHIYAMA)
<p>NotImplementError が残っていたので NotImplementedError に変更していて気づいたのですが、<br>
以下のように IRB.fail が NoMethodError になるようです。</p>
<p>% ruby -v -r irb/output-method -e 'IRB::OutputMethod.new.print'<br>
ruby 2.0.0dev (2012-06-27 trunk 36240) [x86_64-linux]<br>
.../lib/ruby/2.0.0/irb/output-method.rb:22:in <code>print': private method </code>fail' called for IRB:Module (NoMethodError)<br>
from -e:1:in `'</p>
<p>変更前は NameError でした。</p>
<p>% ruby -r irb/output-method -e 'IRB::OutputMethod.new.print'<br>
.../lib/ruby/2.0.0/irb/output-method.rb:22:in <code>print': uninitialized constant IRB::OutputMethod::NotImplementError (NameError) from -e:1:in </code>'</p>
Ruby master - Bug #6598 (Closed): tool/runruby.rb の File.realpath
https://bugs.ruby-lang.org/issues/6598
2012-06-16T00:54:11Z
znz (Kazuhiro NISHIYAMA)
<p>File.realpath が定義されていないときに定義している File.realpath がホームディレクトリを返すだけで File.realpath の代わりになっていません。</p>
Ruby master - Bug #6597 (Closed): README.EXT と README.EXT.ja の内容が違う
https://bugs.ruby-lang.org/issues/6597
2012-06-16T00:51:36Z
znz (Kazuhiro NISHIYAMA)
<p>r35977 で README.EXT だけ変更されているので README.EXT.ja も更新が必要だと思います。</p>