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 - Misc #18726 (Closed): CI Error on c99 and c2x
https://bugs.ruby-lang.org/issues/18726
2022-04-14T02:43:20Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://github.com/ruby/ruby/runs/6013849896?check_suite_focus=true" class="external">https://github.com/ruby/ruby/runs/6013849896?check_suite_focus=true</a></p>
<pre><code>checking char bit... 8
checking size of int... 0
checking size of short... 0
checking size of long... 0
configure: error: in `/__w/ruby/ruby/build':
configure: error: cannot compute sizeof (long long)
See `config.log' for more details
checking size of long long...
Error: Process completed with exit code 77.
</code></pre>
<p>I investigate it, the cause is that autoconf is old in <code>ghcr.io/ruby/ruby-ci-image:clang-15</code>. (Autoconf 2.69)<br>
Autoconf 2.71 generates with <code>void</code>.</p>
<p>How to reproduce:</p>
<pre><code> % docker run --rm -it ghcr.io/ruby/ruby-ci-image:clang-15
$ sudo apt update
$ sudo apt install git
$ git clone --depth=1 https://github.com/ruby/ruby $HOME/src
$ mkdir $HOME/build
$ cd $HOME/build
$ ../src/autogen.sh
$ ../src/configure -C --enable-debug-env --disable-install-doc --with-ext=-test-/cxxanyargs,+ --without-valgrind --without-jemalloc --without-gmp --with-gcc="clang-15 -std=c99 -Werror=pedantic -pedantic-errors" --enable-shared optflags=-O1 debugflags=-ggdb3
</code></pre>
<p>Tail of configure output:</p>
<pre><code> checking char bit... 8
checking size of int... 0
checking size of short... 0
checking size of long... 0
checking size of long long... configure: error: in `/home/ci/build':
configure: error: cannot compute sizeof (long long)
See `config.log' for more details
</code></pre>
<p>Quote from config.log:</p>
<pre><code>configure:13939: checking size of int
configure:13944: clang-15 -std=c99 -Werror=pedantic -pedantic-errors -o conftest -O1 -fno-fast-math -ggdb3 -fdeclspec -fstack-protector-strong conftest.c -lm >&5
conftest.c:107:25: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
static long int longval () { return (long int) (sizeof (int)); }
^
void
conftest.c:108:35: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
static unsigned long int ulongval () { return (long int) (sizeof (int)); }
^
void
2 errors generated.
</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 - Feature #17798 (Closed): exception in finalizer
https://bugs.ruby-lang.org/issues/17798
2021-04-13T13:37:13Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://docs.ruby-lang.org/ja/latest/method/ObjectSpace/m/define_finalizer.html" class="external">https://docs.ruby-lang.org/ja/latest/method/ObjectSpace/m/define_finalizer.html</a> に</p>
<blockquote>
<p>proc の呼び出しで発生した大域脱出(exitや例外)は無視されます。これは、スクリプトのメイン処理が GC の発生によって非同期に中断されるのを防ぐためです。不安なうちは -d オプションで事前に例外の発生の有無を確認しておいた方が良いでしょう。</p>
</blockquote>
<p>とありますが、メインスレッド以外のスレッドが例外で終了したときにデフォルトでは「terminated with exception (report_on_exception is true)」と出るように、デフォルトでは無視せずにメッセージを出すようにしても良いのではないでしょうか?</p>
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 - Feature #17361 (Closed): lambda(&block) does not warn with lazy proc allocation
https://bugs.ruby-lang.org/issues/17361
2020-12-03T02:45:23Z
znz (Kazuhiro NISHIYAMA)
<p>In NEWS,</p>
<pre><code> * Kernel#lambda now warns if called without a literal block.
[[Feature #15973]]
</code></pre>
<p>But the following code from <a href="https://docs.ruby-lang.org/ja/latest/method/Kernel/m/lambda.html" class="external">https://docs.ruby-lang.org/ja/latest/method/Kernel/m/lambda.html</a> (<a href="https://github.com/rurema/doctree/blob/495868c466c97c9bcca28d64d6ce0d68350de3e2/refm/api/src/_builtin/functions#L2436-L2441" class="external">https://github.com/rurema/doctree/blob/495868c466c97c9bcca28d64d6ce0d68350de3e2/refm/api/src/_builtin/functions#L2436-L2441</a>) does not warn.</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">def</span> <span class="nf">foo</span> <span class="o">&</span><span class="n">block</span>
<span class="nb">lambda</span><span class="p">(</span><span class="o">&</span><span class="n">block</span><span class="p">)</span>
<span class="k">end</span>
<span class="n">it</span> <span class="o">=</span> <span class="n">foo</span><span class="p">{</span><span class="nb">p</span> <span class="mi">12</span><span class="p">}</span>
<span class="n">it</span><span class="p">.</span><span class="nf">call</span> <span class="c1">#=> 12</span>
</code></pre>
<p>Once block assign to a local variable, it warns.</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">def</span> <span class="nf">foo</span> <span class="o">&</span><span class="n">block</span>
<span class="n">b</span> <span class="o">=</span> <span class="n">block</span>
<span class="nb">lambda</span><span class="p">(</span><span class="o">&</span><span class="n">b</span><span class="p">)</span>
<span class="k">end</span>
<span class="n">it</span> <span class="o">=</span> <span class="n">foo</span><span class="p">{</span><span class="nb">p</span> <span class="mi">12</span><span class="p">}</span>
<span class="n">it</span><span class="p">.</span><span class="nf">call</span> <span class="c1">#=> 12</span>
</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 - Feature #17173 (Open): open-uri で ciphers を設定したい
https://bugs.ruby-lang.org/issues/17173
2020-09-16T04:55:19Z
znz (Kazuhiro NISHIYAMA)
<p>Debian GNU/Linux 10 (buster) の OpenSSL 1.1.1d の環境だと <a href="https://www.famitsu.com" class="external">https://www.famitsu.com</a> で <code>dh key too small</code> になってつながらないのですが、 <code>ciphers</code> に <code>DEFAULT:!DH</code> を設定するとつながるので、 <code>open-uri</code> 経由でも <code>ciphers</code> を設定したいです。</p>
<p>curl での確認:</p>
<pre><code>% curl --head https://www.famitsu.com/
curl: (35) error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small
zsh: exit 35 curl --head https://www.famitsu.com/
% curl --ciphers 'DEFAULT:!DH' --head https://www.famitsu.com/
HTTP/1.1 200 OK
Server: nginx/1.12.2
Date: Wed, 16 Sep 2020 04:48:25 GMT
Content-Type: text/html
Connection: keep-alive
Vary: Accept-Encoding
Accept-Ranges: bytes
Vary: Accept-Encoding
Strict-Transport-Security: max-age=60
</code></pre>
<p>ruby での確認:</p>
<pre><code>% ruby -r open-uri -e 'open("https://www.famitsu.com/")'
Traceback (most recent call last):
13: from -e:1:in `<main>'
12: from /usr/lib/ruby/2.5.0/open-uri.rb:35:in `open'
11: from /usr/lib/ruby/2.5.0/open-uri.rb:735:in `open'
10: from /usr/lib/ruby/2.5.0/open-uri.rb:165:in `open_uri'
9: from /usr/lib/ruby/2.5.0/open-uri.rb:224:in `open_loop'
8: from /usr/lib/ruby/2.5.0/open-uri.rb:224:in `catch'
7: from /usr/lib/ruby/2.5.0/open-uri.rb:226:in `block in open_loop'
6: from /usr/lib/ruby/2.5.0/open-uri.rb:755:in `buffer_open'
5: from /usr/lib/ruby/2.5.0/open-uri.rb:337:in `open_http'
4: from /usr/lib/ruby/2.5.0/net/http.rb:909:in `start'
3: from /usr/lib/ruby/2.5.0/net/http.rb:920:in `do_start'
2: from /usr/lib/ruby/2.5.0/net/http.rb:985:in `connect'
1: from /usr/lib/ruby/2.5.0/net/protocol.rb:44:in `ssl_socket_connect'
/usr/lib/ruby/2.5.0/net/protocol.rb:44:in `connect_nonblock': SSL_connect returned=1 errno=0 state=error: dh key too small (OpenSSL::SSL::SSLError)
zsh: exit 1 ruby -r open-uri -e 'open("https://www.famitsu.com/")'
% ruby -r net/http -e 'http=Net::HTTP.new("www.famitsu.com", 443); http.use_ssl=true; http.ciphers="DEFAULT:!DH"; p http.get("/")'
#<Net::HTTPOK 200 OK readbody=true>
</code></pre>
<p><a href="https://www.ssllabs.com/ssltest/analyze.html?d=www.famitsu.com" class="external">https://www.ssllabs.com/ssltest/analyze.html?d=www.famitsu.com</a> によると Cipher Suites は</p>
<pre><code># TLS 1.2 (suites in server-preferred order)
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 (0x9f) DH 1024 bits FS WEAK 256
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (0x9e) DH 1024 bits FS WEAK 128
TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 (0x6b) DH 1024 bits FS WEAK 256
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 (0x67) DH 1024 bits FS WEAK 128
TLS_RSA_WITH_AES_256_GCM_SHA384 (0x9d) WEAK 256
TLS_RSA_WITH_AES_128_GCM_SHA256 (0x9c) WEAK 128
TLS_RSA_WITH_AES_256_CBC_SHA256 (0x3d) WEAK 256
TLS_RSA_WITH_AES_128_CBC_SHA256 (0x3c) WEAK 128
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (0xc030) ECDH secp384r1 (eq. 7680 bits RSA) FS 256
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f) ECDH secp384r1 (eq. 7680 bits RSA) FS 128
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 (0xc028) ECDH secp384r1 (eq. 7680 bits RSA) FS WEAK 256
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (0xc027) ECDH secp384r1 (eq. 7680 bits RSA) FS WEAK 128
</code></pre>
<p>となっていて、 Handshake Simulation では</p>
<pre><code>Chrome 80 / Win 10 R RSA 2048 (SHA256) TLS 1.2 TLS_RSA_WITH_AES_256_GCM_SHA384 No FS
Firefox 73 / Win 10 R RSA 2048 (SHA256) TLS 1.2 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ECDH secp256r1 FS
OpenSSL 1.1.1c R RSA 2048 (SHA256) TLS 1.2 TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 DH 1024 FS
</code></pre>
<p>のようになっていて、 <code>TLS_DHE_RSA_WITH_AES_256_GCM_SHA384</code> が選ばれて DH 1024 bit を拒否するクライアントからは繋らない設定になっているサーバーがあるようです。(<code>dh key too small</code> で web 検索すると同様の設定のサーバーは他にもあるようです。)</p>
Ruby master - Feature #17157 (Closed): Remove `ruby -T`
https://bugs.ruby-lang.org/issues/17157
2020-09-06T10:12:11Z
znz (Kazuhiro NISHIYAMA)
<p>Warning says that it will be removed in Ruby 3.0.</p>
<pre><code>% ruby -T1 -e ''
ruby: warning: ruby -T will be removed in Ruby 3.0
</code></pre>
Ruby master - Feature #17136 (Closed): Remove special behavior from $KCODE
https://bugs.ruby-lang.org/issues/17136
2020-08-31T06:36:43Z
znz (Kazuhiro NISHIYAMA)
<p><code>$SAFE</code> is now a normal global variable with no special behavior.<br>
I think <code>$KCODE</code>'s special behavior is also no longer needed.<br>
Warnings since 1.9.</p>
<pre><code>% docker run -it --rm rubylang/all-ruby env ALL_RUBY_SINCE=ruby-1.4 ./all-ruby -e '$KCODE="e"; p $KCODE'
ruby-1.4.0 "EUC"
...
ruby-1.8.7-p374 "EUC"
ruby-1.9.0-0 -e:1: warning: variable $KCODE is no longer effective; ignored
-e:1: warning: variable $KCODE is no longer effective
nil
...
ruby-2.7.1 -e:1: warning: variable $KCODE is no longer effective; ignored
-e:1: warning: variable $KCODE is no longer effective
nil
</code></pre>
Ruby master - Feature #17125 (Closed): Remove Thread.exclusive
https://bugs.ruby-lang.org/issues/17125
2020-08-19T05:13:44Z
znz (Kazuhiro NISHIYAMA)
<p><code>Thread.exclusive</code> is deprecated since 2.3.</p>
<pre><code>% docker run -it --rm rubylang/all-ruby env ALL_RUBY_SINCE=ruby-1.8 ./all-ruby -r thread -e 'Thread.exclusive{}'
ruby-1.8.0
...
ruby-2.3.0-preview1
ruby-2.3.0-preview2 Thread.exclusive is deprecated, use Mutex
-e:1:in `<main>'
...
ruby-2.4.0-preview1 Thread.exclusive is deprecated, use Mutex
-e:1:in `<main>'
ruby-2.4.0-preview2 Thread.exclusive is deprecated, use Thread::Mutex
-e:1:in `<main>'
...
ruby-2.7.0-preview1 Thread.exclusive is deprecated, use Thread::Mutex
-e:1:in `<main>'
ruby-2.7.0-preview2 -e:1: warning: Thread.exclusive is deprecated, use Thread::Mutex
...
ruby-2.7.1 -e:1: warning: Thread.exclusive is deprecated, use Thread::Mutex
</code></pre>
Ruby master - Feature #17039 (Closed): Remove Time#succ
https://bugs.ruby-lang.org/issues/17039
2020-07-21T11:43:14Z
znz (Kazuhiro NISHIYAMA)
<p><code>Time#succ</code> is obsolete since 1.9.2.</p>
<pre><code>% docker run -it --rm rubylang/all-ruby env ALL_RUBY_SINCE=ruby-1.8 ./all-ruby -e 'Time.at(0).succ'
ruby-1.8.0 -e:1: undefined method `succ' for Thu Jan 01 00:00:00 UTC 1970:Time (NoMethodError)
exit 1
ruby-1.8.1
...
ruby-1.9.2-preview1
ruby-1.9.2-preview3 -e:1: warning: Time#succ is obsolete; use time + 1
...
ruby-2.7.1 -e:1: warning: Time#succ is obsolete; use time + 1
</code></pre>
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 - Misc #16630 (Assigned): Deprecate pub/ruby/*snapshot* and use pub/ruby/snapshot/* i...
https://bugs.ruby-lang.org/issues/16630
2020-02-13T08:51:43Z
znz (Kazuhiro NISHIYAMA)
<p>In <a href="https://www.ruby-lang.org/en/downloads/" class="external">https://www.ruby-lang.org/en/downloads/</a>, snapshots links to <code>pub/ruby/snapshot.*</code> and <code>pub/ruby/stable-snapshot.*</code> as official snapshot tarballs now.</p>
<p>I want to change links to snapshot tarballs in <a href="https://cache.ruby-lang.org/pub/ruby/snapshot/" class="external">https://cache.ruby-lang.org/pub/ruby/snapshot/</a>.</p>
<p>They created by <a href="https://github.com/ruby/actions/" class="external">https://github.com/ruby/actions/</a> now.</p>
<p>Tarballs under <code>pub/ruby/snapshot/</code> have branch name (e.g. <code>ruby_2_7</code>) in filenames.<br>
And they are tested. (but they remain even if tests failed.)</p>
<p><code>pub/ruby/*snapshot.*</code> are not tested.<br>
And there are fewer files under <code>pub/ruby/</code> without sub-directory recently. (e.g. <code>ruby- 2.7.*</code> are in <code>pub/ruby/2.7/</code> only.)<br>
So I want to remove them.</p>
<p>Because of the plan, <code>stable-snapshot.*</code> are still snapshot of <code>ruby_2_6</code> instead of <code>ruby_2_7</code>.</p>
Ruby master - Feature #16513 (Closed): TracePoint#inspect to return "... file:line" instead of "....
https://bugs.ruby-lang.org/issues/16513
2020-01-16T08:46:10Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://bugs.ruby-lang.org/issues/16101" class="external"><code>Proc#to_s</code></a> and <a href="https://bugs.ruby-lang.org/issues/16412" class="external"><code>Thread#to_s</code></a> have changed, but <code>TracePoint#inspect</code> includes <code>@</code>.</p>
<p>I think changing <code>TracePoint#inspect</code> too is better for consistency.</p>
<pre><code>% ruby -ve 'TracePoint.new{p _1}.enable;p'
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin18]
#<TracePoint:c_call `p'@-e:1>
#<TracePoint:c_return `p'@-e:1>
</code></pre>
Ruby master - Misc #16483 (Closed): How about stopping new *.tar.bz2 releases?
https://bugs.ruby-lang.org/issues/16483
2020-01-06T07:02:19Z
znz (Kazuhiro NISHIYAMA)
<p>Current ruby releases generate <code>*.tar.gz</code>, <code>*.tar.bz2</code>, <code>*.tar.xz</code>, and <code>*.zip</code>.<br>
But I think we can stop generating <code>*.tar.bz2</code>.</p>
<p>I think <code>*.tar.bz2</code> are less merit.<br>
For better size, <code>*.tar.xz</code> exist.<br>
For better compatibility, <code>*.tar.gz</code> and <code>*.zip</code> exist.</p>
<p>I check some programming languages source package archives.</p>
<ul>
<li>
<a href="https://jdk.java.net/13/" class="external">https://jdk.java.net/13/</a> tar.gz zip</li>
<li>
<a href="https://gcc.gnu.org/mirrors.html" class="external">https://gcc.gnu.org/mirrors.html</a> tar.gz tar.xz</li>
<li>
<a href="https://www.python.org/downloads/source/" class="external">https://www.python.org/downloads/source/</a> tgz tar.xz</li>
<li>
<a href="https://nodejs.org/dist/v12.14.0/" class="external">https://nodejs.org/dist/v12.14.0/</a> tar.gz tar.xz (and 7z zip for win)</li>
<li>
<a href="https://www.perl.org/get.html" class="external">https://www.perl.org/get.html</a> tar.gz</li>
<li>
<a href="https://www.php.net/downloads.php" class="external">https://www.php.net/downloads.php</a> tar.bz2 tar.gz tar.xz</li>
</ul>
<p><code>tar.bz2</code> are rare.</p>
<p>How about stopping <code>*.tar.bz2</code> since next release?</p>
<p>(I know <a href="https://github.com/rbenv/ruby-build" class="external">ruby-build</a> use <code>*.tar.bz2</code>. And it can use <code>*.tar.gz</code>)</p>
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 - Feature #16420 (Closed): Warning[:experimental]=false
https://bugs.ruby-lang.org/issues/16420
2019-12-14T14:42:57Z
znz (Kazuhiro NISHIYAMA)
<p>Current master always warn pattern matching syntax.<br>
It discourage users try them.</p>
<p>Another noisy warnings can stop by <code>Warning[:deprecated]=false</code>.</p>
<p>So I think the future may be more useful if <code>Warning[:experimental]=false</code> or <code>Warning[:pattern_matching]=false</code> can stop warnings.</p>
Ruby master - Feature #16419 (Closed): FrozenError.new ignores receiver:
https://bugs.ruby-lang.org/issues/16419
2019-12-14T07:29:44Z
znz (Kazuhiro NISHIYAMA)
<p>Other exception classes with receiver accept recevier as keyword argument of new.<br>
But FrozenError.new accept as positional argument.<br>
I think keyword argument is better consistency.</p>
<pre><code>% git grep 'receiver[:=]' ../error.c
../error.c: * FrozenError.new(msg=nil, receiver=nil) -> name_error
../error.c: * NameError.new(msg=nil, name=nil, receiver: nil) -> name_error
../error.c: * [1, 2, 3].method(:rject) # NameError with name "rject" and receiver: Array
../error.c: * [1, 2, 3].singleton_method(:rject) # NameError with name "rject" and receiver: [1, 2, 3]
../error.c: * NoMethodError.new(msg=nil, name=nil, args=nil, private=false, receiver: nil) -> no_method_error
../error.c: * KeyError.new(message=nil, receiver: nil, key: nil) -> key_error
</code></pre>
Ruby master - Feature #16412 (Closed): Thread#to_s to return "... file:line" instead of "...@file...
https://bugs.ruby-lang.org/issues/16412
2019-12-10T00:58:56Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://bugs.ruby-lang.org/issues/16101" class="external">Proc#to_s returns "... file:line" instead of "...@file:line"</a>, but <code>Thread#to_s</code> includes <code>@</code>.</p>
<p>I think changing <code>Thread#to_s</code> too is better for consistency.</p>
Ruby master - Feature #16356 (Open): Method#inspect of argument forwarding
https://bugs.ruby-lang.org/issues/16356
2019-11-20T10:58:11Z
znz (Kazuhiro NISHIYAMA)
<p>Current behavior includes <code>(**, &&)</code>.<br>
Is this intentional?</p>
<pre><code>% ruby -e 'def mf(...);end;p method(:mf)'
#<Method: main.mf(**, &&) -e:1>
</code></pre>
<p>I added tests of current behavior at <a href="https://github.com/ruby/ruby/commit/777973084e599cf9efa490173709b187fb507f90" class="external">https://github.com/ruby/ruby/commit/777973084e599cf9efa490173709b187fb507f90</a></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 - Feature #16003 (Closed): Remove doc/etc.rd.ja?
https://bugs.ruby-lang.org/issues/16003
2019-07-15T01:59:35Z
znz (Kazuhiro NISHIYAMA)
<p>doc/etc.rd.ja は</p>
<ul>
<li>情報が古く、後から追加されたメソッドは載っていない</li>
<li>
<a href="https://docs.ruby-lang.org/ja/latest/library/etc.html" class="external">https://docs.ruby-lang.org/ja/latest/library/etc.html</a> に新しいドキュメントが存在する</li>
</ul>
<p>という理由から、削除しても良いと思ったのですが、どうでしょうか?</p>
<p>しばらく待ってみて反対がなければ削除しようと思っています。</p>
Ruby master - Feature #15999 (Open): KeyError#inspect does not contain receiver and key
https://bugs.ruby-lang.org/issues/15999
2019-07-14T07:31:12Z
znz (Kazuhiro NISHIYAMA)
<p>Some exception classes accept <code>receiver:</code>, but <code>#inspect</code> does not show such information.<br>
How about adding receiver (and key) to <code>#inspect</code>?</p>
<pre><code>KeyError.new("message", receiver: :receiver, key: :key).inspect #=> "#<KeyError: message>"
NameError.new("message", receiver: :receiver).inspect #=> "#<NameError: message>"
NoMethodError.new("message", receiver: :receiver).inspect #=> "#<NoMethodError: message>"
</code></pre>
Ruby master - Feature #15915 (Closed): `@1` cannot be achieved in meta-programming
https://bugs.ruby-lang.org/issues/15915
2019-06-12T08:55:19Z
znz (Kazuhiro NISHIYAMA)
<p>I cannot think of any way to get <code>@1</code> in meta-programming, so it is hard to inspect it in a debugger.</p>
<pre><code>% ruby -e 'proc{@1;binding.local_variable_get("@1")}.call(1)'
Traceback (most recent call last):
2: from -e:1:in `<main>'
1: from -e:1:in `block in <main>'
-e:1:in `local_variable_get': wrong local variable name `@1' for #<Binding:0x00007f952401e490> (NameError)
</code></pre>
Ruby master - Feature #15609 (Open): Kernel#sleep returns Float instead of Integer
https://bugs.ruby-lang.org/issues/15609
2019-02-18T07:02:42Z
znz (Kazuhiro NISHIYAMA)
<p><code>rb_f_sleep</code> uses <code>time()</code> internally, so it always returns Integer even if it called with Float.</p>
<p><a href="https://github.com/ruby/ruby/blob/124957566f041e5c6e8f678dfaf62cae381826dc/process.c#L4840-L4857" class="external">https://github.com/ruby/ruby/blob/124957566f041e5c6e8f678dfaf62cae381826dc/process.c#L4840-L4857</a></p>
<p>I think returning Float is more useful than Integer.<br>
(But I have no real use cases now.)</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 - Feature #14931 (Open): [DOC] exception keyword argument is not documented in some m...
https://bugs.ruby-lang.org/issues/14931
2018-07-22T08:53:57Z
znz (Kazuhiro NISHIYAMA)
<p>Some methods accept exception keyword argument since 2.6.0, but it is not documented in rdoc yet.</p>
<p>In NEWS,</p>
<ul>
<li>
<p>Kernel.#Complex takes :exception option to specify the way of error handling [Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: An option to pass to `Integer`, `Float`, to return `nil` instead of raise an exception (Closed)" href="https://bugs.ruby-lang.org/issues/12732">#12732</a>]</p>
</li>
<li>
<p>Kernel.#Float takes :exception option to specify the way of error handling [Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: An option to pass to `Integer`, `Float`, to return `nil` instead of raise an exception (Closed)" href="https://bugs.ruby-lang.org/issues/12732">#12732</a>]</p>
</li>
<li>
<p>Kernel.#Integer takes :exception option to specify the way of error handling [Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: An option to pass to `Integer`, `Float`, to return `nil` instead of raise an exception (Closed)" href="https://bugs.ruby-lang.org/issues/12732">#12732</a>]</p>
</li>
<li>
<p>Kernel.#Rational takes :exception option to specify the way of error handling [Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: An option to pass to `Integer`, `Float`, to return `nil` instead of raise an exception (Closed)" href="https://bugs.ruby-lang.org/issues/12732">#12732</a>]</p>
</li>
<li>
<p>Kernel.#system takes :exception option to raise an exception on<br>
failure. [Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Add option to let Kernel.#system raise error instead of returning false (Closed)" href="https://bugs.ruby-lang.org/issues/14386">#14386</a>]</p>
</li>
</ul>
Ruby master - Feature #14930 (Closed): sample/trick2018
https://bugs.ruby-lang.org/issues/14930
2018-07-21T12:54:04Z
znz (Kazuhiro NISHIYAMA)
<p>まだ TRICK FINAL の上位作品が sample に追加されていないようです。<br>
<a href="https://github.com/tric/trick2018" class="external">https://github.com/tric/trick2018</a></p>
<p>過去の回も含めて情報を探してみると以下のように、何作品を追加するのかは、以下の情報しかみつけられなかったので、以前の回の上位作品を追加した <a class="user active user-mention" href="https://bugs.ruby-lang.org/users/18">@mame (Yusuke Endoh)</a> さんに assign しておきます。</p>
<p><a href="https://magazine.rubyist.net/articles/0043/0043-TRICK2013.html" class="external">https://magazine.rubyist.net/articles/0043/0043-TRICK2013.html</a></p>
<blockquote>
<p>上位 3 (or 4) 作品: Ruby 公式リポジトリにサンプルコードとしてコミットされる (次期 Ruby リリースパッケージにも含まれる予定)</p>
</blockquote>
<p><a href="https://magazine.rubyist.net/articles/0053/0053-TRICK2015.html" class="external">https://magazine.rubyist.net/articles/0053/0053-TRICK2015.html</a></p>
<blockquote>
<p>上位 5 作品: Ruby 公式リポジトリにサンプルコードとしてコミットされる (Ruby 2.3 としてリリース済み)</p>
</blockquote>
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 #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 - Feature #14197 (Open): `Enumerable#{select,reject}` accept a pattern argument
https://bugs.ruby-lang.org/issues/14197
2017-12-18T12:42:52Z
znz (Kazuhiro NISHIYAMA)
<p><code>#all?</code>, <code>#any?</code>, <code>#none?</code>, and <code>#one?</code> accept pattern arguments since 2.5.0.</p>
<p><code>#grep</code>, and <code>#grep_v</code> have such feature, but it is hard for me to remember them since I would be thinking of using <code>#select</code>, or <code>#reject</code>, and <code>#select</code> and <code>#reject</code> don't have such feature.</p>
<p>I want to write</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">collection</span><span class="p">.</span><span class="nf">reject</span><span class="p">(</span><span class="sr">/re/</span><span class="p">)</span>
</code></pre>
<p>instead of</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">collection</span><span class="p">.</span><span class="nf">reject</span> <span class="p">{</span><span class="o">|</span><span class="n">item</span><span class="o">|</span> <span class="sr">/re/</span> <span class="o">=~</span> <span class="n">item</span> <span class="p">}</span>
</code></pre>
<p>or</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">collection</span><span class="p">.</span><span class="nf">grep_v</span><span class="p">(</span><span class="sr">/re/</span><span class="p">)</span>
</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 #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 - Feature #13904 (Closed): getter for original information of Enumerator
https://bugs.ruby-lang.org/issues/13904
2017-09-15T15:27:58Z
znz (Kazuhiro NISHIYAMA)
<p>At <a href="https://gitter.im/red-data-tools/ja?at=59b0aaa097cedeb04828e268" class="external">https://gitter.im/red-data-tools/ja?at=59b0aaa097cedeb04828e268</a> ,<br>
mrkn says narray and pycall use internal information of ruby to check <code>Range#step(n)</code>.</p>
<p>People of red-data-tools/ja suggest subclass of Enumerator.<br>
But I think it does not match Ruby's '大クラス主義' (I don't know this word in English), so I suggest to add some methods to Enumerator class.</p>
<p>proof of concept attached.</p>
<p>Usage:</p>
<pre><code>% irb -r irb/completion --simple-prompt
>> e=(1..2).step(3)
=> #<Enumerator: 1..2:step(3)>
>> e.receiver
=> 1..2
>> e.method_name
=> :step
>> e.arguments
=> [3]
</code></pre>
<p><code>#method</code> is conflict with <code>Kernel#method</code>, so use <code>#method_name</code> instead.</p>
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 #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 #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 - Feature #12739 (Closed): deprecate_constant :Fixnum, :Bignum
https://bugs.ruby-lang.org/issues/12739
2016-09-08T14:42:50Z
znz (Kazuhiro NISHIYAMA)
<p>How about <code>class Object; deprecate_constant :Fixnum, :Bignum; end</code>?</p>
<ul>
<li>naruse supports: <a href="https://twitter.com/nalsh/status/773800491671101441" class="external">https://twitter.com/nalsh/status/773800491671101441</a>
</li>
<li>akr objects: <a href="https://twitter.com/tanaka_akr/status/773817391218249729" class="external">https://twitter.com/tanaka_akr/status/773817391218249729</a>
</li>
</ul>
<p>I don't mind either way.<br>
Do you have any comment about it?</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 #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 - Misc #11079 (Rejected): missing LICENCE
https://bugs.ruby-lang.org/issues/11079
2015-04-20T14:40:01Z
znz (Kazuhiro NISHIYAMA)
<p>r50351 の変更を見ていて気づいたのですが、ext/openssl に (See the file 'LICENCE'.) と書いてあるのに LICENCE ファイルが存在しないようです。(LICENSE の typo というわけでもないようです。)</p>
<p>IRC で話して調べてもらったところ、最初に ext/openssl が取り込まれた r4128 の時点で ruby 本体にも ext/openssl にもなかったということでした。</p>
<p>取り込まれる元になった openssl の方にはあったのでしょうか?</p>
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 #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 #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>
Backport193 - Backport #8513 (Rejected): assertion failed in rb_ary_modify
https://bugs.ruby-lang.org/issues/8513
2013-06-11T18:38:52Z
znz (Kazuhiro NISHIYAMA)
<p>-DARRAY_DEBUG をつけていると rdoc の生成中に array.c:282 で assertion failed になります。</p>
<pre><code> else if (ARY_SHARED_NUM(shared) == 1 && len > (RARRAY_LEN(shared)>>1)) {
long shift = RARRAY_PTR(ary) - RARRAY_PTR(shared);
ARY_SET_PTR(ary, RARRAY_PTR(shared));
ARY_SET_CAPA(ary, RARRAY_LEN(shared));
</code></pre>
<p>の ARY_SET_CAPA が assertion failed になっている 282 行目で、ARY_SET_PTR は通っているので、共通している<br>
assert(!ARY_EMBED_P(ary));<br>
assert(!OBJ_FROZEN(ary));<br>
は問題なくて<br>
assert(!ARY_SHARED_P(ary));<br>
でひっかかっているようです。</p>
Backport200 - Backport #8183 (Closed): CGI.unescapeHTML does not decode あ
https://bugs.ruby-lang.org/issues/8183
2013-03-29T14:12:41Z
znz (Kazuhiro NISHIYAMA)
<p>数値文字参照で あ のように X が大文字の時に CGI.unescapeHTML で "あ" に戻りません。</p>
<p><a href="http://www.w3.org/TR/html5/syntax.html#character-references" class="external">http://www.w3.org/TR/html5/syntax.html#character-references</a><br>
の Hexadecimal numeric character reference によると</p>
<blockquote>
<p>which must be followed by either a "x" (U+0078) character or a "X" (U+0058) character,</p>
</blockquote>
<p>となっているので、大文字でも受け付けてほしいです。</p>
Backport193 - Backport #5786 (Closed): LoadError: cannot load such file -- openssl
https://bugs.ruby-lang.org/issues/5786
2011-12-22T00:26:03Z
znz (Kazuhiro NISHIYAMA)
<p>openssl がビルドされていないと test-all で LoadError: cannot load such file -- openssl になっていくつかエラーになります。<br>
途中で Ctrl+C で止めてしまっているのでもっと出るのかもしれません。</p>
<p>test_cgi_session_filestore(CGISessionTest):<br>
LoadError: cannot load such file -- openssl<br>
.../ruby/lib/securerandom.rb:59:in <code>random_bytes' .../ruby/lib/securerandom.rb:140:in </code>hex'<br>
.../ruby/lib/cgi/session.rb:173:in <code>create_new_id' .../ruby/lib/cgi/session.rb:267:in </code>initialize'<br>
.../ruby/test/cgi/test_cgi_session.rb:33:in <code>new' .../ruby/test/cgi/test_cgi_session.rb:33:in </code>test_cgi_session_filestore'</p>
<ol start="2">
<li>
<p>Error:<br>
test_cgi_session_pstore(CGISessionTest):<br>
LoadError: cannot load such file -- openssl<br>
.../ruby/lib/securerandom.rb:59:in <code>random_bytes' .../ruby/lib/securerandom.rb:140:in </code>hex'<br>
.../ruby/lib/cgi/session.rb:173:in <code>create_new_id' .../ruby/lib/cgi/session.rb:267:in </code>initialize'<br>
.../ruby/test/cgi/test_cgi_session.rb:71:in <code>new' .../ruby/test/cgi/test_cgi_session.rb:71:in </code>test_cgi_session_pstore'</p>
</li>
<li>
<p>Error:<br>
test_cgi_session_specify_session_key(CGISessionTest):<br>
LoadError: cannot load such file -- openssl<br>
.../ruby/lib/securerandom.rb:59:in <code>random_bytes' .../ruby/lib/securerandom.rb:140:in </code>hex'<br>
.../ruby/lib/cgi/session.rb:173:in <code>create_new_id' .../ruby/lib/cgi/session.rb:267:in </code>initialize'<br>
.../ruby/test/cgi/test_cgi_session.rb:148:in <code>new' .../ruby/test/cgi/test_cgi_session.rb:148:in </code>test_cgi_session_specify_session_key'</p>
</li>
<li>
<p>Error:<br>
test_https_proxy_authentication(HTTPSProxyTest):<br>
LoadError: cannot load such file -- openssl<br>
.../ruby/test/net/http/test_https_proxy.rb:16:in `block (2 levels) in test_https_proxy_authentication'</p>
</li>
<li>
<p>Error:<br>
test_ssl_socket_close_on_post_connection_check_fail(Net::TestSSLSocket):<br>
LoadError: cannot load such file -- openssl<br>
.../ruby/lib/net/smtp.rb:197:in <code>default_ssl_context' .../ruby/lib/net/smtp.rb:345:in </code>enable_starttls_auto'<br>
.../ruby/test/net/smtp/test_ssl_socket.rb:51:in `test_ssl_socket_close_on_post_connection_check_fail'</p>
</li>
<li>
<p>Error:<br>
test_ssl_socket_open_on_post_connection_check_success(Net::TestSSLSocket):<br>
LoadError: cannot load such file -- openssl<br>
.../ruby/lib/net/smtp.rb:197:in <code>default_ssl_context' .../ruby/lib/net/smtp.rb:345:in </code>enable_starttls_auto'<br>
.../ruby/test/net/smtp/test_ssl_socket.rb:67:in `test_ssl_socket_open_on_post_connection_check_success'</p>
</li>
</ol>
Backport193 - Backport #5369 (Closed): 1 failure in test_ruby_mode.rb
https://bugs.ruby-lang.org/issues/5369
2011-09-26T15:41:11Z
znz (Kazuhiro NISHIYAMA)
<p>ruby-1.9.3-rc1 が Debian GNU/Linux squeeze amd64 の環境で 1 Failure になります。</p>
<p>% ./ruby -v ../test/misc/test_ruby_mode.rb -v<br>
ruby 1.9.3dev (2011-09-23) [x86_64-linux]<br>
Run options: -v</p>
<a name="Running-tests"></a>
<h1 >Running tests:<a href="#Running-tests" class="wiki-anchor">¶</a></h1>
<p>TestRubyMode::TestIndent#test_array_literal = 0.14 s = F<br>
TestRubyMode::TestIndent#test_expr_in_regexp = 0.17 s = .<br>
TestRubyMode::TestIndent#test_keyword_label = 0.14 s = .<br>
TestRubyMode::TestIndent#test_method_with_question_mark = 0.13 s = .<br>
TestRubyMode::TestIndent#test_simple = 0.13 s = .<br>
TestRubyMode::TestIndent#test_singleton_class = 0.00 s = S</p>
<p>Finished tests in 0.713935s, 8.4041 tests/s, 14.0069 assertions/s.</p>
<ol>
<li>
<p>Failure:<br>
test_array_literal(TestRubyMode::TestIndent) [../test/misc/test_ruby_mode.rb:125]:<br>
<"\nfoo = [\n bar\n]\n"> expected but was<br>
<"\nfoo = [\n bar\n ]\n">.</p>
</li>
<li>
<p>Skipped:<br>
test_singleton_class(TestRubyMode::TestIndent) [../test/misc/test_ruby_mode.rb:108]:<br>
pending</p>
</li>
</ol>
<p>6 tests, 10 assertions, 1 failures, 0 errors, 1 skips<br>
%</p>
Backport192 - Backport #3932 (Closed): lib/un.rb (httpd): SIGQUIT and SIGHUP are not guaranteed t...
https://bugs.ruby-lang.org/issues/3932
2010-10-12T17:31:58Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
Windows で 1.9.2-p0 の un.rb を使って httpd を実行しようとすると動かなかったので r28944 のバックポートをお願いします。<br>
=end</p>
Backport192 - Backport #3468 (Closed): .cvsignore
https://bugs.ruby-lang.org/issues/3468
2010-06-23T17:24:53Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
.cvsignore はもう消してしまっていいのではないでしょうか。</p>
<p>% ls trunk/**/.cvsignore<br>
trunk/.cvsignore trunk/ext/nkf/.cvsignore<br>
trunk/ext/.cvsignore trunk/ext/openssl/.cvsignore<br>
trunk/ext/bigdecimal/.cvsignore trunk/ext/pty/.cvsignore<br>
trunk/ext/curses/.cvsignore trunk/ext/racc/cparse/.cvsignore<br>
trunk/ext/dbm/.cvsignore trunk/ext/readline/.cvsignore<br>
trunk/ext/digest/.cvsignore trunk/ext/ripper/.cvsignore<br>
trunk/ext/digest/bubblebabble/.cvsignore trunk/ext/sdbm/.cvsignore<br>
trunk/ext/digest/md5/.cvsignore trunk/ext/socket/.cvsignore<br>
trunk/ext/digest/rmd160/.cvsignore trunk/ext/stringio/.cvsignore<br>
trunk/ext/digest/sha1/.cvsignore trunk/ext/strscan/.cvsignore<br>
trunk/ext/digest/sha2/.cvsignore trunk/ext/syck/.cvsignore<br>
trunk/ext/dl/.cvsignore trunk/ext/syslog/.cvsignore<br>
trunk/ext/etc/.cvsignore trunk/ext/tk/.cvsignore<br>
trunk/ext/fcntl/.cvsignore trunk/ext/tk/tkutil/.cvsignore<br>
trunk/ext/gdbm/.cvsignore trunk/ext/win32ole/.cvsignore<br>
trunk/ext/iconv/.cvsignore trunk/ext/zlib/.cvsignore<br>
trunk/ext/io/wait/.cvsignore<br>
%<br>
=end</p>
Backport187 - Backport #3425 (Closed): Error: test_filehandler(WEBrick::TestFileHandler)
https://bugs.ruby-lang.org/issues/3425
2010-06-11T10:18:24Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
test_filehandler(WEBrick::TestFileHandler) の Error が手元の環境でも chkbuild でも発生しています。</p>
<p><a href="http://www.rubyist.net/~akr/chkbuild/debian/ruby-1.8.7/log/20100611T085812.log.txt.gz" class="external">http://www.rubyist.net/~akr/chkbuild/debian/ruby-1.8.7/log/20100611T085812.log.txt.gz</a></p>
<ol start="3">
<li>Error:<br>
test_filehandler(WEBrick::TestFileHandler):<br>
NameError: undefined local variable or method <code>log' for #<WEBrick::TestFileHandler:0xb74a5058> ./test/webrick/test_filehandler.rb:96:in </code>test_filehandler'<br>
/home/akr/chkbuild/tmp/build/ruby-1.8.7/20100611T085812/ruby/lib/net/http.rb:1054:in <code>request' /home/akr/chkbuild/tmp/build/ruby-1.8.7/20100611T085812/ruby/lib/net/http.rb:2144:in </code>reading_body'<br>
/home/akr/chkbuild/tmp/build/ruby-1.8.7/20100611T085812/ruby/lib/net/http.rb:1053:in <code>request' /home/akr/chkbuild/tmp/build/ruby-1.8.7/20100611T085812/ruby/lib/net/http.rb:1037:in </code>request'<br>
/home/akr/chkbuild/tmp/build/ruby-1.8.7/20100611T085812/ruby/lib/net/http.rb:543:in <code>start' /home/akr/chkbuild/tmp/build/ruby-1.8.7/20100611T085812/ruby/lib/net/http.rb:1035:in </code>request'<br>
./test/webrick/test_filehandler.rb:95:in <code>test_filehandler' ./test/webrick/utils.rb:38:in </code>call'<br>
./test/webrick/utils.rb:38:in <code>start_server' ./test/webrick/utils.rb:46:in </code>start_httpserver'<br>
./test/webrick/test_filehandler.rb:79:in `test_filehandler'<br>
=end</li>
</ol>
Backport191 - Backport #3149 (Closed): Mac OS X の ruby 1.9.1p378 で再 open 後 delete した Tempfile が c...
https://bugs.ruby-lang.org/issues/3149
2010-04-15T13:55:38Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
<a href="https://blade.ruby-lang.org/ruby-dev/40992">[ruby-dev:40992]</a> は trunk だと r24662 で修正されているようなので Backport リクエストとしてチケットを登録しておきます。</p>
<p>At Thu, 15 Apr 2010 10:42:47 +0900,<br>
KISHIMOTO, Makoto wrote:</p>
<blockquote>
<p>きしもとです</p>
<p>trunk に残っているかどうかわかりませんが、MacPorts の ruby 1.9 で<br>
以下のようなバグを確認しました。(ruby 1.8 ではエラーにならないので<br>
バグだと思います)</p>
<p>$ ruby1.9 -v<br>
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10]</p>
<p>$ cat hoge.rb<br>
require 'tempfile'</p>
<p>tempfile = Tempfile.open "hoge"<br>
tempfile.write "hoge\n"<br>
tempfile.close<br>
tempfile.open<br>
tempfile.delete<br>
print tempfile.read</p>
<p>$ ruby1.9 hoge.rb<br>
hoge.rb:8:in `read': closed stream (IOError)</p>
</blockquote>
<p>=end</p>
Backport191 - Bug #2727 (Third Party's Issue): make: *** [encdb.h] Aborted
https://bugs.ruby-lang.org/issues/2727
2010-02-09T23:58:17Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
Ubuntu 9.10 の環境で ruby_1_9_1 を make すると encdb.h のところでアボートします。<br>
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9) なので <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Build failure on i586 (Closed)" href="https://bugs.ruby-lang.org/issues/1299">#1299</a> と似ている気がしますが、よくわかりませんでした。</p>
<p>./miniruby -I/home/kazu/wc/ruby/branches/ruby_1_9_1/lib -I.ext/common -I./- -r/home/kazu/wc/ruby/branches/ruby_1_9_1/ext/purelib.rb /home/kazu/wc/ruby/branches/ruby_1_9_1/tool/generic_erb.rb -c -o encdb.h /home/kazu/wc/ruby/branches/ruby_1_9_1/template/encdb.h.tmpl /home/kazu/wc/ruby/branches/ruby_1_9_1/enc enc<br>
/home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1310: [BUG] Segmentation fault<br>
ruby 1.9.1p420 (2010-02-04 revision 26571) [i686-linux]</p>
<h2>-- control frame ----------<br>
c:0013 p:---- s:0060 b:0060 l:000059 d:000059 CFUNC :catch<br>
c:0012 p:0049 s:0056 b:0056 l:001d30 d:001024 BLOCK /home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1310<br>
c:0011 p:---- s:0050 b:0050 l:000049 d:000049 FINISH<br>
c:0010 p:---- s:0048 b:0048 l:000047 d:000047 CFUNC :catch<br>
c:0009 p:0062 s:0044 b:0044 l:001d30 d:001d30 METHOD /home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1258<br>
c:0008 p:0024 s:0034 b:0034 l:000033 d:000033 METHOD /home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1252<br>
c:0007 p:0066 s:0029 b:0029 l:000c7c d:0004f8 BLOCK /home/kazu/wc/ruby/branches/ruby_1_9_1/tool/generic_erb.rb:12<br>
c:0006 p:0116 s:0026 b:0026 l:000025 d:000025 METHOD /home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:793<br>
c:0005 p:---- s:0020 b:0020 l:000019 d:000019 FINISH<br>
c:0004 p:---- s:0018 b:0018 l:000017 d:000017 CFUNC :new<br>
c:0003 p:0069 s:0015 b:0015 l:000c7c d:001ae8 EVAL /home/kazu/wc/ruby/branches/ruby_1_9_1/tool/generic_erb.rb:8<br>
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH<br>
c:0001 p:0000 s:0002 b:0002 l:000c7c d:000c7c TOP</h2>
<p>-- Ruby level backtrace information-----------------------------------------<br>
/home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1310:in <code>catch' /home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1310:in </code>block in parse_in_order'<br>
/home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1258:in <code>catch' /home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1258:in </code>parse_in_order'<br>
/home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1252:in <code>order!' /home/kazu/wc/ruby/branches/ruby_1_9_1/tool/generic_erb.rb:12:in </code>block in '<br>
/home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:793:in <code>initialize' /home/kazu/wc/ruby/branches/ruby_1_9_1/tool/generic_erb.rb:8:in </code>new'<br>
/home/kazu/wc/ruby/branches/ruby_1_9_1/tool/generic_erb.rb:8:in `'</p>
<p>-- C level backtrace information -------------------------------------------<br>
0x816a589 ./miniruby(rb_vm_bugreport+0x69) [0x816a589]<br>
0x808674f ./miniruby [0x808674f]<br>
0x80867ea ./miniruby(rb_bug+0x3a) [0x80867ea]<br>
0x8111974 ./miniruby [0x8111974]<br>
0x4001d410 [0x4001d410]<br>
0x8158368 ./miniruby [0x8158368]<br>
0x81586a4 ./miniruby [0x81586a4]<br>
0x81631a6 ./miniruby [0x81631a6]<br>
0x815e40a ./miniruby [0x815e40a]<br>
0x81617b9 ./miniruby [0x81617b9]<br>
0x8167f16 ./miniruby [0x8167f16]<br>
0x8158368 ./miniruby [0x8158368]<br>
0x81586a4 ./miniruby [0x81586a4]<br>
0x81631a6 ./miniruby [0x81631a6]<br>
0x815e40a ./miniruby [0x815e40a]<br>
0x81617b9 ./miniruby [0x81617b9]<br>
0x81637c3 ./miniruby [0x81637c3]<br>
0x815af7e ./miniruby(rb_funcall2+0xfe) [0x815af7e]<br>
0x8087a60 ./miniruby(rb_obj_call_init+0x50) [0x8087a60]<br>
0x80bd48a ./miniruby(rb_class_new_instance+0x3a) [0x80bd48a]<br>
0x8158368 ./miniruby [0x8158368]<br>
0x81586a4 ./miniruby [0x81586a4]<br>
0x81631a6 ./miniruby [0x81631a6]<br>
0x815e40a ./miniruby [0x815e40a]<br>
0x81617b9 ./miniruby [0x81617b9]<br>
0x8161a0b ./miniruby(rb_iseq_eval_main+0xab) [0x8161a0b]<br>
0x8088737 ./miniruby(ruby_exec_node+0xb7) [0x8088737]<br>
0x8089d46 ./miniruby(ruby_run_node+0x56) [0x8089d46]<br>
0x805cfde ./miniruby(main+0x7e) [0x805cfde]<br>
0x400ccb56 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0x400ccb56]<br>
0x805cec1 ./miniruby [0x805cec1]</p>
<p>[NOTE]<br>
You may encounter a bug of Ruby interpreter. Bug reports are welcome.<br>
For details: <a href="http://www.ruby-lang.org/bugreport.html" class="external">http://www.ruby-lang.org/bugreport.html</a></p>
<p>make: *** [encdb.h] Aborted</p>
<p>gdb でちょっと調べてみた感じだと th が 0xffffffff になっていて th->errinfo で落ちているようです。</p>
<p>% gdb --args ./miniruby -I/home/kazu/wc/ruby/branches/ruby_1_9_1/lib -I.ext/common -I./- -r/home/kazu/wc/ruby/branches/ruby_1_9_1/ext/purelib.rb /home/kazu/wc/ruby/branches/ruby_1_9_1/tool/generic_erb.rb -c -o encdb.h /home/kazu/wc/ruby/branches/ruby_1_9_1/template/encdb.h.tmpl /home/kazu/wc/ruby/branches/ruby_1_9_1/enc enc<br>
GNU gdb (GDB) 7.0-ubuntu<br>
Copyright (C) 2009 Free Software Foundation, Inc.<br>
License GPLv3+: GNU GPL version 3 or later <a href="http://gnu.org/licenses/gpl.html" class="external">http://gnu.org/licenses/gpl.html</a><br>
This is free software: you are free to change and redistribute it.<br>
There is NO WARRANTY, to the extent permitted by law. Type "show copying"<br>
and "show warranty" for details.<br>
This GDB was configured as "i486-linux-gnu".<br>
For bug reporting instructions, please see:<br>
<a href="http://www.gnu.org/software/gdb/bugs/" class="external">http://www.gnu.org/software/gdb/bugs/</a>...<br>
Reading symbols from /home/kazu/build/ruby/ruby_1_9_1/ruby/miniruby...done.<br>
(gdb) r<br>
Starting program: /home/kazu/build/ruby/ruby_1_9_1/ruby/miniruby -I/home/kazu/wc/ruby/branches/ruby_1_9_1/lib -I.ext/common -I./- -r/home/kazu/wc/ruby/branches/ruby_1_9_1/ext/purelib.rb /home/kazu/wc/ruby/branches/ruby_1_9_1/tool/generic_erb.rb -c -o encdb.h /home/kazu/wc/ruby/branches/ruby_1_9_1/template/encdb.h.tmpl /home/kazu/wc/ruby/branches/ruby_1_9_1/enc enc<br>
[Thread debugging using libthread_db enabled]<br>
[New Thread 0xb7c00b70 (LWP 14843)]</p>
<p>Program received signal SIGSEGV, Segmentation fault.<br>
0x08167f46 in rb_f_catch (argc=1, argv=0xb7c010ec)<br>
at /home/kazu/wc/ruby/branches/ruby_1_9_1/vm_eval.c:1258<br>
1258 else if (state == TAG_THROW && RNODE(th->errinfo)->u1.value == tag) {<br>
(gdb) p state == TAG_THROW<br>
$1 = 1<br>
(gdb) p th<br>
$2 = (rb_thread_t *) 0xffffffff<br>
(gdb)<br>
=end</p>
Ruby 1.8 - Bug #2703 (Closed): make test failed
https://bugs.ruby-lang.org/issues/2703
2010-02-01T08:11:14Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
ruby_1_8 ブランチで make test が失敗します。</p>
<p>chkbuild のログでどこからだったのか調べてみると<br>
<a href="http://www.rubyist.net/~akr/chkbuild/debian/ruby-1.8/log/20091223T220147.diff.txt.gz" class="external">http://www.rubyist.net/~akr/chkbuild/debian/ruby-1.8/log/20091223T220147.diff.txt.gz</a><br>
からのようです。<br>
=end</p>
Backport191 - Backport #2598 (Closed): test-all で [BUG] Segmentation fault
https://bugs.ruby-lang.org/issues/2598
2010-01-12T19:49:37Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
ruby_1_9_1 の make test-all で落ちるので r25747 の変更のバックポートをお願いします。</p>
<p>IMAPTest#test_imaps_with_ca_file: /home/kazu/build/ruby/ruby_1_9_1/ruby/.ext/common/openssl/buffering.rb:35: [BUG] Segmentation fault<br>
ruby 1.9.1p378 (2010-01-10 revision 26272) [i686-linux]</p>
<h2>-- control frame ----------<br>
c:0006 p:---- s:0022 b:0022 l:000021 d:000021 CFUNC :sysread<br>
c:0005 p:0022 s:0018 b:0017 l:000016 d:000016 METHOD /home/kazu/build/ruby/ruby_1_9_1/ruby/.ext/common/openssl/buffering.rb:35<br>
c:0004 p:0051 s:0014 b:0014 l:000013 d:000013 METHOD /home/kazu/build/ruby/ruby_1_9_1/ruby/.ext/common/openssl/buffering.rb:106<br>
c:0003 p:0043 s:0007 b:0007 l:000518 d:000006 BLOCK /home/kazu/wc/ruby/branches/ruby_1_9_1/test/net/imap/test_imap.rb:134<br>
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH<br>
c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP</h2>
<p>-- Ruby level backtrace information-----------------------------------------<br>
/home/kazu/build/ruby/ruby_1_9_1/ruby/.ext/common/openssl/buffering.rb:35:in <code>sysread' /home/kazu/build/ruby/ruby_1_9_1/ruby/.ext/common/openssl/buffering.rb:35:in </code>fill_rbuff'<br>
/home/kazu/build/ruby/ruby_1_9_1/ruby/.ext/common/openssl/buffering.rb:106:in <code>gets' /home/kazu/wc/ruby/branches/ruby_1_9_1/test/net/imap/test_imap.rb:134:in </code>block in imaps_test'</p>
<p>-- C level backtrace information -------------------------------------------<br>
0x4014a029 /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1(rb_vm_bugreport+0x69) [0x4014a029]<br>
0x4006635f /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1 [0x4006635f]<br>
0x400663fa /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1(rb_bug+0x3a) [0x400663fa]<br>
0x400f1564 /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1 [0x400f1564]<br>
0x4001d410 [0x4001d410]<br>
0x40f5553d /lib/libc.so.6(cfree+0x6d) [0x40f5553d]<br>
0x40de666b /home/kazu/build/ruby/ruby_1_9_1/ruby/.ext/i686-linux/dl.so [0x40de666b]<br>
0x4007683a /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1 [0x4007683a]<br>
0x400769b4 /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1 [0x400769b4]<br>
0x40076a0b /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1 [0x40076a0b]<br>
0x4014db08 /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1 [0x4014db08]<br>
0x4014dd6d /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1 [0x4014dd6d]<br>
0x4014f44e /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1 [0x4014f44e]<br>
0x4014f652 /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1 [0x4014f652]<br>
0x4061c295 /home/kazu/build/ruby/ruby_1_9_1/ruby/.ext/i686-linux/openssl.so [0x4061c295]<br>
0x40137d88 /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1 [0x40137d88]<br>
0x401380c4 /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1 [0x401380c4]<br>
0x40143566 /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1 [0x40143566]<br>
0x4013dcba /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1 [0x4013dcba]<br>
0x40141079 /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1 [0x40141079]<br>
0x401430b0 /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1(rb_vm_invoke_proc+0x270) [0x401430b0]<br>
0x4014eddc /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1 [0x4014eddc]<br>
0x4014eef1 /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1 [0x4014eef1]<br>
0x401c480e /lib/tls/i686/cmov/libpthread.so.0 [0x401c480e]<br>
0x4030a8de /lib/tls/i686/cmov/libc.so.6(clone+0x5e) [0x4030a8de]</p>
<p>[NOTE]<br>
You may encounter a bug of Ruby interpreter. Bug reports are welcome.<br>
For details: <a href="http://www.ruby-lang.org/bugreport.html" class="external">http://www.ruby-lang.org/bugreport.html</a></p>
<p>Aborted<br>
make: *** [test-all] エラー 134<br>
=end</p>
Backport191 - Backport #1976 (Closed): Errors in test/fileutils/test_fileutils.rb
https://bugs.ruby-lang.org/issues/1976
2009-08-21T22:13:09Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
環境によっては test_fileutils.rb でエラーになることがあるようです。</p>
<ol start="5">
<li>
<p>Error:<br>
test_rm_f(TestFileUtils):<br>
TypeError: can't convert Array into String<br>
/home/kazu/wc/ruby/trunk/test/fileutils/test_fileutils.rb:420:in `test_rm_f'</p>
</li>
<li>
<p>Error:<br>
test_rm_f(TestFileUtilsNoWrite):<br>
TypeError: can't convert Hash into String<br>
/home/kazu/wc/ruby/trunk/test/fileutils/test_nowrite.rb:78:in `test_rm_f'</p>
</li>
<li>
<p>Error:<br>
test_rm_rf(TestFileUtilsNoWrite):<br>
TypeError: can't convert Hash into String<br>
/home/kazu/wc/ruby/trunk/test/fileutils/test_nowrite.rb:84:in `test_rm_rf'</p>
</li>
</ol>
<p>状況を調べてみると FileUtils::NoWrite の rm_rf の super で mkmf.rb の rm_rf が呼ばれていました。</p>
<p>そのときの self.class.ancestors は<br>
[TestFileUtilsNoWrite, FileUtils::NoWrite, Test::Unit::TestCase, Test::Unit::Ass<br>
ertions, MiniTest::Unit::TestCase, MiniTest::Assertions, Object, JSON::Ext::Gene<br>
rator::GeneratorMethods::Object, RakeFileUtils, FileUtils, FileUtils::StreamUtil<br>
s_, PP::ObjectMixin, Kernel, BasicObject]<br>
となっていて、 FileUtils::NoWrite と FileUtils の間に Object が入っている (ここに mkmf.rb で rm_rf が定義されている) のが原因のようです。</p>
<p>以下のようにすると再現できます。</p>
<p>% ruby-trunk -r mkmf -r fileutils -e '<br>
include FileUtils<br>
class C<br>
include FileUtils::NoWrite<br>
def hoge<br>
p self.class.ancestors<br>
rm_rf("hoge")<br>
end<br>
end<br>
C.new.hoge'<br>
[C, FileUtils::NoWrite, Object, FileUtils, FileUtils::StreamUtils_, Kernel, BasicObject]<br>
/home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/mkmf.rb:201:in <code>[]': can't convert Hash into String (TypeError) from /home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/mkmf.rb:201:in </code>rm_rf'<br>
from /home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/fileutils.rb:1556:in <code>rm_rf' from -e:7:in </code>hoge'<br>
from -e:10:in `'<br>
%<br>
=end</p>
Ruby 1.8 - Bug #1714 (Closed): make test-all failed
https://bugs.ruby-lang.org/issues/1714
2009-07-02T20:23:14Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
<code>make test-all</code> failed in lib/test/unit/collector/dir.rb.</p>
<p>./miniruby -I/home/kazu/wc/ruby/branches/ruby_1_8/lib -I.ext/common -I./- -r/home/kazu/wc/ruby/branches/ruby_1_8/ext/purelib.rb /home/kazu/wc/ruby/branches/ruby_1_8/runruby.rb --extout=.ext -- "/home/kazu/wc/ruby/branches/ruby_1_8/test/runner.rb" --basedir="/home/kazu/wc/ruby/branches/ruby_1_8/test" --runner=console -v<br>
/home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick/ssl.rb:13: uninitialized constant WEBrick::Config::General (NameError)<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick/https.rb:11:in <code>require' from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick/https.rb:11 from /home/kazu/wc/ruby/branches/ruby_1_8/test/webrick/utils.rb:10:in </code>require'<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/test/webrick/utils.rb:10<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick/config.rb:14:in <code>require' from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick/config.rb:14 from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick.rb:14:in </code>require'<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick.rb:14<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/soap/rpc/httpserver.rb:12:in <code>require' from /home/kazu/wc/ruby/branches/ruby_1_8/lib/soap/rpc/httpserver.rb:12 from /home/kazu/wc/ruby/branches/ruby_1_8/lib/soap/rpc/standaloneServer.rb:9:in </code>require'<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/soap/rpc/standaloneServer.rb:9<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/test/wsdl/raa/RAAService.rb:4:in <code>require' from /home/kazu/wc/ruby/branches/ruby_1_8/test/wsdl/raa/RAAService.rb:4 from /home/kazu/wc/ruby/branches/ruby_1_8/test/wsdl/raa/test_raa.rb:5:in </code>require'<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/test/wsdl/raa/test_raa.rb:5<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:90:in <code>require' from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:90:in </code>collect_file'<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:73:in <code>recursive_collect' from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:58:in </code>each'<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:58:in <code>recursive_collect' from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:63:in </code>recursive_collect'<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:58:in <code>each' from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:58:in </code>recursive_collect'<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:63:in <code>recursive_collect' from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:58:in </code>each'<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:58:in <code>recursive_collect' from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:29:in </code>collect'<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/autorunner.rb:68<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/autorunner.rb:213:in <code>[]' from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/autorunner.rb:213:in </code>run'<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/autorunner.rb:12:in `run'<br>
from /home/kazu/wc/ruby/branches/ruby_1_8/test/runner.rb:7<br>
make: *** [test-all] エラー 1</p>
<p>I put "p $LOAD_PATH" into lib/webrick/ssl.rb, and it outputs:<br>
["/home/kazu/wc/ruby/branches/ruby_1_8/test/wsdl/raa", "/home/kazu/wc/ruby/branches/ruby_1_8/test", "/home/kazu/wc/ruby/branches/ruby_1_8/test/ruby", "/home/kazu/build/ruby/ruby_1_8/ruby", "/home/kazu/build/ruby/ruby_1_8/ruby/.ext/common", "/home/kazu/build/ruby/ruby_1_8/ruby/.ext/i686-linux", "/home/kazu/wc/ruby/branches/ruby_1_8/lib", "/home/kazu/wc/ruby/branches/ruby_1_8/ext", "."]</p>
<p>It looks require 'webrick/utils' loads test/webrick/utils.rb instead of lib/webrick/utils.rb, because $LOAD_PATH includes test directory.<br>
=end</p>
Backport191 - Backport #1485 (Rejected): warning in pathname when verbose mode
https://bugs.ruby-lang.org/issues/1485
2009-05-18T20:06:11Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
verbose mode で pathname を require すると warning がでます。</p>
<p>% ruby-trunk -v -r pathname -e ''<br>
ruby 1.9.2dev (2009-05-15 trunk 23433) [i686-linux]<br>
/home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/pathname.rb:273: warning: <code>*' interpreted as argument prefix % ruby-1.9.1 -v -r pathname -e '' ruby 1.9.1p129 (2009-05-12 revision 23411) [i686-linux] /home/kazu/opt/ruby-1.9.1/lib/ruby-1.9.1/1.9.1/pathname.rb:270: warning: </code><em>' interpreted as argument prefix<br>
% ruby18 -v -r pathname -e ''<br>
ruby 1.8.8dev (2009-05-15 revision 23432) [i686-linux]<br>
/home/kazu/opt/ruby18/lib/ruby/1.8/pathname.rb:263: warning: `</em>' interpreted as argument prefix<br>
% ruby-1.8.7 -v -r pathname -e ''<br>
ruby 1.8.7 (2009-04-08 patchlevel 160) [i686-linux]<br>
% ruby-1.8.6 -v -r pathname -e ''<br>
ruby 1.8.6 (2009-03-31 patchlevel 368) [i686-linux]<br>
%<br>
=end</p>
Ruby 1.8 - Bug #1417 (Closed): sleepすると反応がなくなる
https://bugs.ruby-lang.org/issues/1417
2009-04-28T18:57:12Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
ruby_1_8 ブランチで --enable-pthread のとき、スレッドを生成した後 sleep すると<br>
何も反応がなくなって SIGKILL で強制的に止めるしかなくなってしまいます。</p>
<p>% ruby18 -ve 'Thread.start{};sleep 1'<br>
ruby 1.8.8dev (2009-04-26 revision 23283) [i686-linux]<br>
ここで止まってCtrl+Cもきかない<br>
=end</p>
Ruby 1.8 - Bug #1402 (Closed): test_cookie(TestCookie)でtest-allが止まる
https://bugs.ruby-lang.org/issues/1402
2009-04-24T12:53:52Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
<a href="http://www.rubyist.net/~akr/chkbuild/debian/ruby-1.8-pth/last" class="external">http://www.rubyist.net/~akr/chkbuild/debian/ruby-1.8-pth/last</a><br>
のように ruby 1.8.8dev で --enable-pthread の場合に止まります。</p>
<p>挙動から推測すると、while修飾子の左がリテラルだとスレッドが<br>
切り替わっていないような気がします。</p>
<p>% cat t.rb<br>
require 'timeout'<br>
@flag = true<br>
Thread.start {<br>
sleep 0.1<br>
@flag = false<br>
}<br>
Timeout.timeout(1) {<br>
nil while @flag<br>
}<br>
% ruby18 -vd t.rb<br>
ruby 1.8.8dev (2009-04-22 revision 23257) [i686-linux]<br>
=end</p>
Backport191 - Backport #1072 (Closed): Ripper#filename
https://bugs.ruby-lang.org/issues/1072
2009-01-30T05:13:46Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
Ripper::Filter#filenameが定義されているのにRipper#filenameが定義されていないため、NoMethodErrorになります。</p>
<p>% cat ~/check_regexp_n.rb<br>
#!/usr/bin/ruby</p>
<p>require 'ripper/filter'</p>
<p>class CheckRegexpN < Ripper::Filter<br>
def on_regexp_end(token, data)<br>
if /n/ =~ token<br>
puts "#{filename}:#{lineno}:#{column}:#{token}"<br>
end<br>
end<br>
end</p>
<p>ARGV.each do |path|<br>
open(path, "rb") do |f|<br>
parser = CheckRegexpN.new(f, path)<br>
p [parser.filename, parser.lineno, parser.column]<br>
parser.parse<br>
p [parser.filename, parser.lineno, parser.column]<br>
end<br>
end<br>
% ruby-trunk -vd ~/check_regexp_n.rb lib/minitest/spec.rb<br>
ruby 1.9.1p5000 (2009-01-30 trunk 21885) [i686-linux]<br>
Exception <code>NoMethodError' at .../1.9.1/ripper/filter.rb:27 - undefined method </code>filename' for #<a href="Ripper::Lexer:0x8170bbc" class="external">Ripper::Lexer:0x8170bbc</a><br>
.../1.9.1/ripper/filter.rb:27:in <code>filename': undefined method </code>filename' for #<a href="Ripper::Lexer:0x8170bbc" class="external">Ripper::Lexer:0x8170bbc</a> (NoMethodError)<br>
from .../check_regexp_n.rb:16:in <code>block (2 levels) in <main>' from .../check_regexp_n.rb:14:in </code>open'<br>
from .../check_regexp_n.rb:14:in <code>block in <main>' from .../check_regexp_n.rb:13:in </code>each'<br>
from .../check_regexp_n.rb:13:in `'<br>
%</p>
<p>ripper_linenoをまねして以下のようにripper_filenameを定義してみたのですが、<br>
if (NIL_P(parser->parsing_thread)) return Qnil;<br>
の行があるとnilしか返ってこなかったのでコメントアウトしています。</p>
<a name="Index-parsey"></a>
<h1 >Index: parse.y<a href="#Index-parsey" class="wiki-anchor">¶</a></h1>
<p>--- parse.y (リビジョン 21885)<br>
+++ parse.y (作業コピー)<br>
@@ -10239,6 +10239,25 @@</p>
<p>/*</p>
<ul>
<li>call-seq:</li>
</ul>
<ul>
<li>
<ul>
<li>ripper#filename -> String</li>
</ul>
</li>
<li>
<ul>
<li>
</ul>
</li>
<li>
<ul>
<li>Return current parsing filename.</li>
</ul>
</li>
<li>*/<br>
+static VALUE<br>
+ripper_filename(VALUE self)<br>
+{</li>
<li>struct parser_params *parser;</li>
<li>
<li>Data_Get_Struct(self, struct parser_params, parser);</li>
<li>if (!ripper_initialized_p(parser)) {</li>
<li>
<pre><code> rb_raise(rb_eArgError, "method called for uninitialized object");
</code></pre>
</li>
<li>}<br>
+/* if (NIL_P(parser->parsing_thread)) return Qnil; */</li>
<li>return parser->parser_ruby_sourcefile_string;<br>
+}</li>
<li>
</ul>
<p>+/*</p>
<ul>
<li>
<ul>
<li>call-seq:</li>
<li>ripper#lineno -> Integer</li>
<li>
<li>Return line number of current parsing line.<br>
@@ -10288,6 +10307,7 @@<br>
rb_define_method(Ripper, "initialize", ripper_initialize, -1);<br>
rb_define_method(Ripper, "parse", ripper_parse, 0);<br>
rb_define_method(Ripper, "column", ripper_column, 0);</li>
</ul>
</li>
<li>rb_define_method(Ripper, "filename", ripper_filename, 0);<br>
rb_define_method(Ripper, "lineno", ripper_lineno, 0);<br>
rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);<br>
rb_define_method(Ripper, "encoding", rb_parser_encoding, 0);<br>
=end</li>
</ul>
Ruby 1.8 - Bug #1062 (Closed): Error: test_def_method
https://bugs.ruby-lang.org/issues/1062
2009-01-27T19:48:18Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
test_def_method(TestERBCore)とtest_def_method(TestERBCoreWOStrScan)でErrorがでています。</p>
<p><a href="http://www.rubyist.net/~akr/chkbuild/debian/ruby-1.8/last" class="external">http://www.rubyist.net/~akr/chkbuild/debian/ruby-1.8/last</a></p>
<ol>
<li>
<p>Error:<br>
test_def_method(TestERBCore):<br>
ArgumentError: wrong number of arguments (3 for 2)<br>
/home/akr/chkbuild/tmp/build/ruby-1.8/20090127T101411/ruby/test/erb/test_erb.rb:240:in <code>def_erb_method' /home/akr/chkbuild/tmp/build/ruby-1.8/20090127T101411/ruby/test/erb/test_erb.rb:240:in </code>test_def_method'<br>
/home/akr/chkbuild/tmp/build/ruby-1.8/20090127T101411/ruby/test/erb/test_erb.rb:239:in <code>module_eval' /home/akr/chkbuild/tmp/build/ruby-1.8/20090127T101411/ruby/test/erb/test_erb.rb:239:in </code>test_def_method'</p>
</li>
<li>
<p>Error:<br>
test_def_method(TestERBCoreWOStrScan):<br>
ArgumentError: wrong number of arguments (3 for 2)<br>
/home/akr/chkbuild/tmp/build/ruby-1.8/20090127T101411/ruby/test/erb/test_erb.rb:240:in <code>def_erb_method' /home/akr/chkbuild/tmp/build/ruby-1.8/20090127T101411/ruby/test/erb/test_erb.rb:240:in </code>test_def_method'<br>
/home/akr/chkbuild/tmp/build/ruby-1.8/20090127T101411/ruby/test/erb/test_erb.rb:239:in <code>module_eval' /home/akr/chkbuild/tmp/build/ruby-1.8/20090127T101411/ruby/test/erb/test_erb.rb:239:in </code>test_def_method'<br>
=end</p>
</li>
</ol>
Ruby 1.8 - Bug #989 (Rejected): [1.8.6] Crash during build on Mac OS 10.5.3/PPC when configured w...
https://bugs.ruby-lang.org/issues/989
2009-01-07T19:32:07Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
<a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Crash during build on Mac OS 10.5.3/PPC when configured with --enable-pthread (Closed)" href="https://bugs.ruby-lang.org/issues/193">#193</a> <a href="/issues/193">[ruby-core:17333]</a> の件が以前確認したときは ruby_1_8_7 だけだった気がしたのですが、<br>
ruby_1_8 と ruby_1_8_6 でも起きていたので、ruby_1_8 には ruby_1_8_7 と同じ修正を入れました。</p>
<p>ruby_1_8_6 には<br>
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE"<br>
AC_TRY_CPP([#include <AvailabilityMacros.h><br>
#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040<br>
#error pre OS X 10.4<br>
[!<===== pre OS X 10.4 =====>]<br>
#endif<br>
],<br>
[<br>
test "x$target_cpu" = xpowerpc && ac_cv_header_ucontext_h=no<br>
],<br>
[<br>
AC_DEFINE(BROKEN_SETREUID, 1)<br>
AC_DEFINE(BROKEN_SETREGID, 1)<br>
])<br>
の部分自体がなかったので、まだ修正できていません。<br>
=end</p>
Ruby 1.8 - Bug #795 (Rejected): test_gdbm.rb: tmptest_gdbm_,tmptest_gdbm_rdonlyが残っているとErrorになる
https://bugs.ruby-lang.org/issues/795
2008-11-26T00:31:02Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
test/gdbm/test_gdbm.rbが、segumentation faultなどで中断してしまって、<br>
tmptest_gdbm_,tmptest_gdbm_rdonlyが残ってしまうと次にテストを実行した<br>
ときにErrorになります。</p>
<p>test/dbm/test_dbm.rbなども同様の問題があるようです。</p>
<p>それからカレントディレクトリにファイルを作るのもあまり良くないと<br>
思うのですが、どうでしょうか。<br>
=end</p>
Ruby 1.8 - Bug #789 (Closed): RSTRING in ext/gdbm/gdbm.c
https://bugs.ruby-lang.org/issues/789
2008-11-25T16:01:52Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
西山和広です。</p>
<p><a href="/issues/788">[ruby-core:20082]</a>にひっかかったので、とりあえず</p>
<a name="Index-objectc"></a>
<h1 >Index: object.c<a href="#Index-objectc" class="wiki-anchor">¶</a></h1>
<p>--- object.c(revision 20352)<br>
+++ object.c(working copy)<br>
@@ -223,7 +223,7 @@<br>
}<br>
clone = rb_obj_alloc(rb_obj_class(obj));<br>
RBASIC(clone)->klass = rb_singleton_class_clone(obj);</p>
<ul>
<li>RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT)) & ~(FL_FREEZE|FL_FINALIZE);</li>
</ul>
<ul>
<li>RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT|ELTS_SHARED)) & ~(FL_FREEZE|FL_FINALIZE);<br>
init_copy(clone, obj);<br>
RBASIC(clone)->flags |= RBASIC(obj)->flags & FL_FREEZE;</li>
</ul>
<p>として回避してみたところ、gdbmのテストの中で落ちるようになったので、<br>
調べてみたところ、rb_str_s_allocでELTS_SHAREDが設定されているのに<br>
aux.sharedを無視してaux.capaを設定していて、それを後で<br>
RSTRING(aux.shared)で参照されてしまうのが原因だとわかりました。</p>
<p>以下のようにした方が良いと思ったのですが、どうでしょうか?</p>
<a name="Index-extgdbmgdbmc"></a>
<h1 >Index: ext/gdbm/gdbm.c<a href="#Index-extgdbmgdbmc" class="wiki-anchor">¶</a></h1>
<p>--- ext/gdbm/gdbm.c(revision 20352)<br>
+++ ext/gdbm/gdbm.c(working copy)<br>
@@ -303,12 +303,7 @@<br>
if (val.dptr == 0)<br>
return Qnil;</p>
<ul>
<li>str = rb_obj_alloc(rb_cString);</li>
<li>RSTRING(str)->len = val.dsize;</li>
<li>RSTRING(str)->aux.capa = val.dsize;</li>
<li>RSTRING(str)->ptr = REALLOC_N(val.dptr,char,val.dsize+1);</li>
<li>RSTRING(str)->ptr[val.dsize] = '\0';</li>
<li>
</ul>
<ul>
<li>str = rb_str_new(val.dptr, val.dsize);<br>
OBJ_TAINT(str);<br>
return (VALUE)str;<br>
}<br>
@@ -349,12 +344,7 @@<br>
if (key.dptr == 0)<br>
return Qnil;</li>
</ul>
<ul>
<li>str = rb_obj_alloc(rb_cString);</li>
<li>RSTRING(str)->len = key.dsize;</li>
<li>RSTRING(str)->aux.capa = key.dsize;</li>
<li>RSTRING(str)->ptr = REALLOC_N(key.dptr,char,key.dsize+1);</li>
<li>RSTRING(str)->ptr[RSTRING(str)->len] = '\0';</li>
<li>
</ul>
<ul>
<li>str = rb_str_new(key.dptr, key.dsize);<br>
OBJ_TAINT(str);<br>
return str;<br>
}<br>
@@ -373,12 +363,7 @@<br>
if (key2.dptr == 0)<br>
return Qnil;</li>
</ul>
<ul>
<li>str = rb_obj_alloc(rb_cString);</li>
<li>RSTRING(str)->len = key2.dsize;</li>
<li>RSTRING(str)->aux.capa = key2.dsize;</li>
<li>RSTRING(str)->ptr = REALLOC_N(key2.dptr,char,key2.dsize+1);</li>
<li>RSTRING(str)->ptr[RSTRING(str)->len] = '\0';</li>
<li>
</ul>
<ul>
<li>str = rb_str_new(key2.dptr, key2.dsize);<br>
OBJ_TAINT(str);<br>
return str;<br>
}</li>
</ul>
<p>--<br>
|ZnZ(ゼット エヌ ゼット)<br>
|西山和広(Kazuhiro NISHIYAMA)<br>
=end</p>
Ruby 1.8 - Bug #613 (Closed): segmentetion fault by Marshal.dump
https://bugs.ruby-lang.org/issues/613
2008-10-01T16:13:12Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
西山和広です。</p>
<p>Marshal.dumpに第2引数のIOを指定すると落ちます。</p>
<p>% ruby18 -ve 'Marshal.dump(nil, open("/dev/null", "wb"))'<br>
ruby 1.8.7 (2008-09-27 revision 19596) [i686-linux]<br>
-e:1: [BUG] Segmentation fault<br>
ruby 1.8.7 (2008-09-27 revision 19596) [i686-linux]<br>
%</p>
<p>check_dump_argのarg->wrapperがNULLの時に落ちるようで、<br>
以下のように初期化すると確実に再現できます。</p>
<a name="Index-marshalc"></a>
<h1 >Index: marshal.c<a href="#Index-marshalc" class="wiki-anchor">¶</a></h1>
<p>--- marshal.c(リビジョン 19651)<br>
+++ marshal.c(作業コピー)<br>
@@ -761,7 +761,7 @@<br>
{<br>
VALUE obj, port, a1, a2;<br>
int limit = -1;</p>
<ul>
<li>struct dump_arg arg;</li>
</ul>
<ul>
<li>
<p>struct dump_arg arg = {0};<br>
struct dump_call_arg c_arg;</p>
<p>port = Qnil;</p>
</li>
</ul>
<p>--<br>
|ZnZ(ゼット エヌ ゼット)<br>
|西山和広(Kazuhiro NISHIYAMA)<br>
=end</p>
Ruby 1.8 - Bug #569 (Closed): emacs21でruby-mode.el
https://bugs.ruby-lang.org/issues/569
2008-09-16T20:53:51Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
西山和広です。</p>
<p>At Mon, 26 May 2008 15:58:47 +0900,<br>
Kazuhiro NISHIYAMA wrote:</p>
<blockquote>
<p>emacs21でruby-mode.elが<br>
File mode specification error: (void-function run-mode-hooks)<br>
となって動きません。</p>
</blockquote>
<p>ruby_1_8の方は動かないままのようです。</p>
<a name="Index-miscruby-modeel"></a>
<h1 >Index: misc/ruby-mode.el<a href="#Index-miscruby-modeel" class="wiki-anchor">¶</a></h1>
<p>--- misc/ruby-mode.el (revision 16583)<br>
+++ misc/ruby-mode.el (working copy)<br>
@@ -312,7 +312,9 @@<br>
(set (make-local-variable 'font-lock-syntax-table) ruby-font-lock-syntax-table)<br>
(set (make-local-variable 'font-lock-syntactic-keywords) ruby-font-lock-syntactic-keywords)</p>
<ul>
<li>(run-mode-hooks 'ruby-mode-hook))</li>
</ul>
<ul>
<li>(if (fboundp 'run-mode-hooks)</li>
<li>
<pre><code> (run-mode-hooks 'ruby-mode-hook)
</code></pre>
</li>
<li>(run-hooks 'ruby-mode-hook)))</li>
</ul>
<p>(defun ruby-current-indentation ()<br>
(save-excursion</p>
<p>--<br>
|ZnZ(ゼット エヌ ゼット)<br>
|西山和広(Kazuhiro NISHIYAMA)<br>
=end</p>
Ruby 1.8 - Bug #367 (Closed): ruby_1_8のrssで3E
https://bugs.ruby-lang.org/issues/367
2008-07-27T22:27:25Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
環境によってはrssでErrorが出ます。</p>
<ol>
<li>
<p>Error:<br>
test_atom_content(RSS::TestAtomCore):<br>
LoadError: no such file to load -- zlib<br>
/home/kazu/wc/ruby-lang/ruby_1_8/test/rss/test_atom.rb:644:in <code>require' /home/kazu/wc/ruby-lang/ruby_1_8/test/rss/test_atom.rb:644:in </code>assert_atom_content_inline_other_base64_to_s'<br>
/home/kazu/wc/ruby-lang/ruby_1_8/test/rss/test_atom.rb:643:in <code>assert_atom_content_inline_other_base64_to_s' /home/kazu/wc/ruby-lang/ruby_1_8/test/rss/test_atom.rb:604:in </code>assert_atom_content_to_s'<br>
/home/kazu/wc/ruby-lang/ruby_1_8/test/rss/test_atom.rb:600:in <code>assert_atom_content_to_s' /home/kazu/wc/ruby-lang/ruby_1_8/test/rss/test_atom.rb:205:in </code>test_atom_content'</p>
</li>
<li>
<p>Error:<br>
test_entry_content_text(RSS::TestParserAtom):<br>
LoadError: no such file to load -- zlib<br>
/home/kazu/wc/ruby-lang/ruby_1_8/test/rss/rss-assertions.rb:560:in <code>require' /home/kazu/wc/ruby-lang/ruby_1_8/test/rss/rss-assertions.rb:560:in </code>assert_atom_content_inline_other_text'<br>
/home/kazu/wc/ruby-lang/ruby_1_8/test/rss/rss-assertions.rb:559:in <code>assert_atom_content_inline_other_text' /home/kazu/wc/ruby-lang/ruby_1_8/test/rss/rss-assertions.rb:553:in </code>assert_atom_content_inline_other'<br>
/home/kazu/wc/ruby-lang/ruby_1_8/test/rss/rss-assertions.rb:552:in <code>assert_atom_content_inline_other' /home/kazu/wc/ruby-lang/ruby_1_8/test/rss/rss-assertions.rb:459:in </code>assert_atom_content'<br>
/home/kazu/wc/ruby-lang/ruby_1_8/test/rss/rss-assertions.rb:456:in <code>assert_atom_content' /home/kazu/wc/ruby-lang/ruby_1_8/test/rss/test_parser_atom_entry.rb:100:in </code>test_entry_content_text'</p>
</li>
<li>
<p>Error:<br>
test_entry_content(RSS::TestParserAtomFeed):<br>
LoadError: no such file to load -- zlib<br>
/home/kazu/wc/ruby-lang/ruby_1_8/test/rss/rss-assertions.rb:560:in <code>require' /home/kazu/wc/ruby-lang/ruby_1_8/test/rss/rss-assertions.rb:560:in </code>assert_atom_content_inline_other_text'<br>
/home/kazu/wc/ruby-lang/ruby_1_8/test/rss/rss-assertions.rb:559:in <code>assert_atom_content_inline_other_text' /home/kazu/wc/ruby-lang/ruby_1_8/test/rss/rss-assertions.rb:553:in </code>assert_atom_content_inline_other'<br>
/home/kazu/wc/ruby-lang/ruby_1_8/test/rss/rss-assertions.rb:552:in <code>assert_atom_content_inline_other' /home/kazu/wc/ruby-lang/ruby_1_8/test/rss/rss-assertions.rb:459:in </code>assert_atom_content'<br>
/home/kazu/wc/ruby-lang/ruby_1_8/test/rss/rss-assertions.rb:456:in <code>assert_atom_content' /home/kazu/wc/ruby-lang/ruby_1_8/test/rss/test_parser_atom_feed.rb:147:in </code>test_entry_content'</p>
</li>
</ol>
<p>1847 tests, 1343396 assertions, 0 failures, 3 errors<br>
=end</p>
Ruby 1.8 - Bug #194 (Closed): test_circular_references(YAML_Unit_Tests)
https://bugs.ruby-lang.org/issues/194
2008-06-19T20:03:29Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
西山和広です。</p>
<p>1.8.5と1.8.6のmake test-allがDebian etchの環境で<br>
test_circular_references(YAML_Unit_Tests)<br>
で[BUG] Segmentation faultになります。</p>
<p>別の環境(Ubuntu hardy)だと<br>
SystemStackError: stack level too deep<br>
になっていました。</p>
<p>--<br>
|ZnZ(ゼット エヌ ゼット)<br>
|西山和広(Kazuhiro NISHIYAMA)<br>
=end</p>