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 #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 #18759 (Closed): snapshot-ruby_2_7: test failure on macos-12
https://bugs.ruby-lang.org/issues/18759
2022-04-28T00:18:36Z
znz (Kazuhiro NISHIYAMA)
<p>snapshot tarball のテストに macos-12 を追加したところ、 snapshot-ruby_2_7 で failure が発生していました。</p>
<p><a href="https://github.com/ruby/actions/runs/6199339063?check_suite_focus=true#step:17:138" class="external">https://github.com/ruby/actions/runs/6199339063?check_suite_focus=true#step:17:138</a></p>
<pre><code>
1) Failure:
TestRipper::ParserEvents#test_block_variables [/Users/runner/work/actions/actions/snapshot-ruby_2_7/test/ripper/test_parser_events.rb:1506]:
<a href="https://blade.ruby-lang.org/ruby-dev/39423">[ruby-dev:39423]</a>
pid 44233 exit 1
| -:1:in `setrlimit': Invalid argument - setrlimit (Errno::EINVAL)
| from -:1:in `<main>'
.
1. [1/2] Assertion for "stdout"
| <["[fcall(proc,[],&block([],[unary(!,ref(y))]))]"]> expected but was
| <[]>.
2. [2/2] Assertion for "stderr"
| <[]> expected but was
| <["-:1:in `setrlimit': Invalid argument - setrlimit (Errno::EINVAL)",
| "\tfrom -:1:in `<main>'"]>.
</code></pre>
<p>該当するテストは master では <a href="https://github.com/ruby/ruby/commit/1c7f5a57125001447dc6173847dc68aa50bd8e93" class="external">https://github.com/ruby/ruby/commit/1c7f5a57125001447dc6173847dc68aa50bd8e93</a> で setrlimit を使わないようになっていました。</p>
<p>コマンドラインでいくつかの値を試してみたところ、 macos-12 での EINVAL は設定しようとしている値が小さすぎるからのようでした。</p>
<pre><code>% /usr/bin/ruby -ve 'Process.setrlimit(Process::RLIMIT_AS, 1000*1024*1024)'
ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.arm64e-darwin21]
-e:1:in `setrlimit': Invalid argument - setrlimit (Errno::EINVAL)
from -e:1:in `<main>'
% /usr/bin/ruby -ve 'lim=Process.getrlimit(Process::RLIMIT_AS); p lim; Process.setrlimit(Process::RLIMIT_AS, lim[0]/2); p Process.getrlimit(Process::RLIMIT_AS)'
ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.arm64e-darwin21]
[9223372036854775807, 9223372036854775807]
[4611686018427387903, 4611686018427387903]
</code></pre>
Ruby master - Bug #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 - 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 #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 #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 - 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 #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 #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 #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 - 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 #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 #14427 (Closed): Backport r61469
https://bugs.ruby-lang.org/issues/14427
2018-01-31T14:56:04Z
znz (Kazuhiro NISHIYAMA)
<p>Please backport r61469 to ruby_2_5 branch.</p>
<p>2.5.0:</p>
<pre><code>% rbenv exec irb -r irb/completion --simple-prompt
>> {foo: 1}.fetch(:fooo)
Traceback (most recent call last):
3: from .../bin/irb:11:in `<main>'
2: from (irb):1
1: from (irb):1:in `fetch'
KeyError (key not found: :fooo
Did you mean? :foo)
</code></pre>
<p>trunk:</p>
<pre><code>>> {foo: 1}.fetch(:fooo)
Traceback (most recent call last):
3: from .../bin/irb:11:in `<main>'
2: from (irb):1
1: from (irb):1:in `fetch'
KeyError (key not found: :fooo)
Did you mean? :foo
</code></pre>
Ruby master - Feature #14316 (Closed): Update Status Code classes
https://bugs.ruby-lang.org/issues/14316
2018-01-05T13:54:55Z
znz (Kazuhiro NISHIYAMA)
<p>In lib/net/http/responses.rb, some class names are old names.<br>
So I would like to update and add <code>103 Early Hints</code> if no objection.</p>
<p>see <a href="https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml" class="external">https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml</a></p>
Ruby master - Bug #14264 (Closed): RDoc comment of warn does not mention uplevel:
https://bugs.ruby-lang.org/issues/14264
2018-01-01T15:23:38Z
znz (Kazuhiro NISHIYAMA)
<p><code>Kernel#warn</code> support uplevel keyword argument since 2.5.0, but rdoc does not mention it.</p>
<p><a href="https://github.com/ruby/ruby/blob/691b05e83c41d089c4f6c7a8bbac9dd63f36a144/error.c#L309-L325" class="external">https://github.com/ruby/ruby/blob/691b05e83c41d089c4f6c7a8bbac9dd63f36a144/error.c#L309-L325</a></p>
Ruby master - Bug #14262 (Closed): ArgumentError (negative level (-1)) when `warn "test message",...
https://bugs.ruby-lang.org/issues/14262
2017-12-31T10:33:16Z
znz (Kazuhiro NISHIYAMA)
<p>When <code>uplevel: -2</code>, error message says <code>negative level (-1)</code>.<br>
When <code>uplevel: -1</code>, no exception occur.<br>
What is expected behavior?</p>
<pre><code>% irb -r irb/completion --simple-prompt
>> warn("test", uplevel: -1)
(irb):1: warning: test
=> nil
>> warn("test", uplevel: -2)
Traceback (most recent call last):
3: from bin/irb:11:in `<main>'
2: from (irb):2
1: from (irb):2:in `warn'
ArgumentError (negative level (-1))
>> warn("test", uplevel: 0)
(irb):3: warning: test
=> nil
>> warn("test", uplevel: 1)
</code></pre>
Ruby master - 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 #14075 (Closed): File.dirname("path without dir".taint) returns untainted string
https://bugs.ruby-lang.org/issues/14075
2017-11-02T13:00:58Z
znz (Kazuhiro NISHIYAMA)
<p>Is this intentional?</p>
<pre><code>% ruby -e 'p [File.dirname("foo/bar".taint).tainted?, File.dirname("hoge".taint).tainted?]'
[true, false]
</code></pre>
Ruby master - Feature #14040 (Open): deprecate HTTP.version_1_2
https://bugs.ruby-lang.org/issues/14040
2017-10-22T09:32:41Z
znz (Kazuhiro NISHIYAMA)
<p>r60311 をみて、<code>Net::HTTP#min_version/max_version</code> って長い間 1.2 になってから変わっていない net/http 自体のバージョンと紛らわしいと思ったので、 <code>Net::HTTP.version_1_2</code> などは deprecated にして、将来のバージョン (ruby 3.0?) では削除してしまうのはどうでしょうか?</p>
<p>(ついでに書いてしまうと HTTP 自体のバージョンとも紛らわしいので <code>Net::HTTP#min_ssl_version/max_ssl_version</code> のような名前の方が良いかもしれないと思いました。)</p>
Ruby master - Feature #13969 (Closed): Dir#each_child
https://bugs.ruby-lang.org/issues/13969
2017-10-04T11:11:35Z
znz (Kazuhiro NISHIYAMA)
<p>Dir has class method pairs: <code>Dir.entries</code> / <code>Dir.children</code>, <code>Dir.foreach</code> / <code>Dir.each_child</code>.<br>
But instance method is <code>Dir#each</code> only.<br>
How about adding <code>Dir#each_child</code>?</p>
Ruby master - Bug #13906 (Closed): homepage in gemspec
https://bugs.ruby-lang.org/issues/13906
2017-09-15T16:00:21Z
znz (Kazuhiro NISHIYAMA)
<p>Some gemspec files set ruby-lang site instead of github site to homepage.<br>
Is it intentional?</p>
<pre><code>% git ls-files '*.gemspec' | xargs grep homepage | grep ruby-lang
ext/io/console/io-console.gemspec: s.homepage = "https://www.ruby-lang.org"
ext/openssl/openssl.gemspec: s.homepage = "https://www.ruby-lang.org/".freeze
ext/sdbm/sdbm.gemspec: s.homepage = "https://www.ruby-lang.org"
ext/stringio/stringio.gemspec: s.homepage = "https://www.ruby-lang.org".freeze
ext/strscan/strscan.gemspec: s.homepage = "https://www.ruby-lang.org"
lib/webrick/webrick.gemspec: s.homepage = "https://www.ruby-lang.org"
</code></pre>
Ruby master - Feature #13713 (Rejected): socketの便利メソッドのdatagramのUNIXSocket用対応
https://bugs.ruby-lang.org/issues/13713
2017-07-04T14:06:05Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://docs.ruby-lang.org/ja/latest/class/Socket.html" class="external">https://docs.ruby-lang.org/ja/latest/class/Socket.html</a> に</p>
<blockquote>
<p>ソケットオブジェクトを生成する汎用的な方法として Socket.new がありますが、以下のようなより便利な メソッドがあります。</p>
</blockquote>
<p>として</p>
<ul>
<li>TCP のクライアントソケット Socket.tcp TCPSocket.open</li>
<li>TCP のサーバソケット Socket.tcp_server_loop, Socket.tcp_server_sockets, TCPServer.open</li>
<li>UNIX socket のクライアントソケット Socket.unix UNIXSocket.open</li>
<li>UNIX socket のサーバソケット Socket.unix_server_loop, Socket.unix_server_socket, UNIXServer.open</li>
</ul>
<p>があげられていて、要約には書かれていませんが、UDP 用に udp_server_loop や udp_server_sockets もありますが、datagram の UNIXSocket は Socket.unix も UNIXSocket.open も対応していなくて、</p>
<p><a href="https://gist.github.com/zimbatm/9f1bc26446af0ee3e5c5#gistcomment-1902920" class="external">https://gist.github.com/zimbatm/9f1bc26446af0ee3e5c5#gistcomment-1902920</a> にあるように</p>
<pre><code>def notify_socket
@notify_socket ||= Socket.new(Socket::AF_UNIX, Socket::SOCK_DGRAM, 0).tap do |socket|
socket.connect(Socket.pack_sockaddr_un(ENV["NOTIFY_SOCKET"]))
socket.close_on_exec = true
end
end
</code></pre>
<p>のように <a href="https://docs.ruby-lang.org/en/2.4.0/Socket.html#method-c-new" class="external">Socket.new(:UNIX, :DGRAM)</a> して pack_sockaddr_un して connect する必要があるようです。</p>
<p>datagram の UNIXSocket も Socket.unix(path, :DGRAM) や UNIXSocket.open(path, :DGRAM) という感じで簡単に書けるようにならないでししょうか?<br>
それとも見つけられなかっただけで、すでに簡単な方法があるのでしょうか?</p>
<p>ユースケースとしては例としてあげたように systemd の Type=notify で使われているソケットへの送信があります。</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 #13191 (Closed): sample/pty/shl.rb がうまく動かない
https://bugs.ruby-lang.org/issues/13191
2017-02-04T07:12:26Z
znz (Kazuhiro NISHIYAMA)
<p>sample/pty/shl.rb で c で起動したシェルを exit で終了した時に終了がうまく検知できないようです。</p>
<p>r57530 の修正がないと 1.8.6 でも動かなかったので、その修正をしたもので試したのですが、1.8.6 や 1.8.7 で試すとメインスレッドに <code>PTY::ChildExited</code> が発生して、<code>writer</code> メソッドの <code>STDIN.getc</code> が中断して rescue 節で <code>'Exit'</code> が返り、うまく終了が検知できました。</p>
<p>たぶんネイティブスレッドを使うようになった 1.9 以降(?)だと思うのですが、<code>PTY::ChildExited</code> が発生せず、<code>ps</code> コマンドで確認するとシェルが defunct になっています。</p>
<p>ここまでは調べられたのですが、ちょっと調べた限りでは、これが <code>sample/pty/shl.rb</code> のバグなのか <code>ext/pty</code> のバグなのかわかりませんでした。</p>
Ruby master - Bug #12793 (Closed): Warning.warn with non-string object
https://bugs.ruby-lang.org/issues/12793
2016-09-27T14:58:35Z
znz (Kazuhiro NISHIYAMA)
<p><code>Warning.warn</code> with non-string argument causes SEGV.<br>
For example, <code>Warning.warn nil</code>.</p>
Ruby master - Bug #12777 (Closed): NoMethodError: undefined method `garbage_collect' for GC:Module
https://bugs.ruby-lang.org/issues/12777
2016-09-20T12:28:24Z
znz (Kazuhiro NISHIYAMA)
<p>RDoc says <code>GC.garbage_collect</code> is equal to <code>GC.start</code>. But <code>GC.garbage_collect</code> is a normal method. It is not a singleton method.<br>
So <code>GC.garbage_collect</code> raises <code>NoMethodError: undefined method `garbage_collect' for GC:Module</code>.<br>
Which is expected behavior?</p>
Ruby master - 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 #12475 (Closed): SHARABLE_MIDDLE_SUBSTRING=1のとき、環境変数が正しく設定されない
https://bugs.ruby-lang.org/issues/12475
2016-06-09T14:11:28Z
znz (Kazuhiro NISHIYAMA)
<p><code>-DSHARABLE_MIDDLE_SUBSTRING=1</code> でビルドすると以下の failures がでます。</p>
<pre><code>[15969/16628] TestTimeTZ#test_gen_right_America_Los_Angeles_91 = 0.00 s
3) Failure:
TestTimeTZ#test_gen_right_America_Los_Angeles_91 [/home/vagrant/ruby/test/ruby/test_time_tz.rb:257]:
TZ=right/America/Los_Angeles Time.utc(1972, 6, 30, 23, 59, 60).
<"1972-06-30 23:59:60 UTC"> expected but was
<"1972-07-01 00:00:00 UTC">.
[15970/16628] TestTimeTZ#test_gen_right_America_Los_Angeles_92 = 0.00 s
4) Failure:
TestTimeTZ#test_gen_right_America_Los_Angeles_92 [/home/vagrant/ruby/test/ruby/test_time_tz.rb:257]:
TZ=right/America/Los_Angeles Time.utc(2008, 12, 31, 23, 59, 60).
<"2008-12-31 23:59:60 UTC"> expected but was
<"2009-01-01 00:00:00 UTC">.
[15971/16628] TestTimeTZ#test_gen_right_America_Los_Angeles_95 = 0.00 s
5) Failure:
TestTimeTZ#test_gen_right_America_Los_Angeles_95 [/home/vagrant/ruby/test/ruby/test_time_tz.rb:277]:
TZ=right/America/Los_Angeles Time.local(1972, 6, 30, 16, 59, 60).
<"1972-06-30 16:59:60 -0700"> expected but was
<"1972-06-30 17:00:00 +0000">.
[15972/16628] TestTimeTZ#test_gen_right_America_Los_Angeles_96 = 0.00 s
6) Failure:
TestTimeTZ#test_gen_right_America_Los_Angeles_96 [/home/vagrant/ruby/test/ruby/test_time_tz.rb:277]:
TZ=right/America/Los_Angeles Time.local(2008, 12, 31, 15, 59, 60).
<"2008-12-31 15:59:60 -0800"> expected but was
<"2008-12-31 16:00:00 +0000">.
</code></pre>
<p>原因を調べてみたところ、<code>ENV.[]=</code> で環境変数が正しく設定されていませんでした。</p>
<pre><code>$ irb -r irb/completion --simple-prompt
>> ENV["TZ"]="right/America/Los_Angeles.".chop
=> "right/America/Los_Angeles"
>> Time.utc(1972, 6, 30, 23, 59, 60)
=> 1972-07-01 00:00:00 UTC
>> ENV["TZ"]
=> "right/America/Los_Angeles."
>>
</code></pre>
Ruby master - Bug #12407 (Rejected): 2 failures of TestMkmf::TestConvertible
https://bugs.ruby-lang.org/issues/12407
2016-05-20T14:30:17Z
znz (Kazuhiro NISHIYAMA)
<p>jessie の clang でビルドすると <code>TestMkmf::TestConvertible#test_typeof_builtin</code> と <code>TestMkmf::TestConvertible#test_typeof_typedef</code> で failure になります。</p>
<pre><code>$ dpkg -l clang | grep ^ii
ii clang 1:3.5-25 amd64 C, C++ and Objective-C compiler (LLVM based)
$ make test-all TESTS="mkmf/test_convertible.rb" >log.txt 2>&1
</code></pre>
Ruby master - Bug #11855 (Closed): CGI.escapeHTML and taint/frozen
https://bugs.ruby-lang.org/issues/11855
2015-12-21T14:22:31Z
znz (Kazuhiro NISHIYAMA)
<p>taint フラグや frozen の扱いが変わってしまっているようです。</p>
<pre><code>% ruby -v -r cgi -e 'p CGI.escapeHTML("".taint).tainted?'
ruby 2.3.0dev (2015-12-21 trunk 53230) [x86_64-darwin14]
true
% ruby -v -r cgi -e 'p CGI.escapeHTML("&".taint).tainted?'
ruby 2.3.0dev (2015-12-21 trunk 53230) [x86_64-darwin14]
false
% ruby -v -r cgi -e 'p CGI.escapeHTML("".freeze).frozen?'
ruby 2.3.0dev (2015-12-21 trunk 53230) [x86_64-darwin14]
true
% ruby -v -r cgi -e 'p CGI.escapeHTML("&".freeze).frozen?'
ruby 2.3.0dev (2015-12-21 trunk 53230) [x86_64-darwin14]
false
</code></pre>
<pre><code>% ruby -v -r cgi -e 'p CGI.escapeHTML("".taint).tainted?'
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin14]
true
% ruby -v -r cgi -e 'p CGI.escapeHTML("&".taint).tainted?'
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin14]
true
% ruby -v -r cgi -e 'p CGI.escapeHTML("".freeze).frozen?'
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin14]
false
% ruby -v -r cgi -e 'p CGI.escapeHTML("&".freeze).frozen?'
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin14]
false
</code></pre>
Ruby master - Bug #11730 (Closed): read_nonblock's call-seq missing options
https://bugs.ruby-lang.org/issues/11730
2015-11-22T08:32:49Z
znz (Kazuhiro NISHIYAMA)
<p><code>IO#write_nonblock</code> call-seq has <code>[, options]</code>, but <code>IO#read_nonblock</code> does not.</p>
<p>In prelude.rb:</p>
<pre><code> # call-seq:
# ios.read_nonblock(maxlen) -> string
# ios.read_nonblock(maxlen, outbuf) -> outbuf
</code></pre>
<pre><code> # call-seq:
# ios.write_nonblock(string) -> integer
# ios.write_nonblock(string [, options]) -> integer
</code></pre>
Ruby master - Bug #11255 (Closed): dev系パッケージが入っていないときのテストのエラーが変
https://bugs.ruby-lang.org/issues/11255
2015-06-12T13:02:31Z
znz (Kazuhiro NISHIYAMA)
<p>dev 系パッケージが入っていないときの拡張ライブラリが require できるかどうかのテストのエラーが変です。</p>
<pre><code> 1) Error:
TestExtLibs#test_existence_of_fiddle:
ArgumentError: invalid byte sequence in US-ASCII
.../test/lib/test/unit/assertions.rb:455:in `sub'
.../test/lib/test/unit/assertions.rb:455:in `block (2 levels) in message'
.../test/lib/test/unit/assertions.rb:455:in `map'
.../test/lib/test/unit/assertions.rb:455:in `block in message'
</code></pre>
<p>mkmf.log に日本語が入っているからのようで、</p>
<pre><code>diff --git a/test/ruby/test_extlibs.rb b/test/ruby/test_extlibs.rb
index 71dcf2b..995baa0 100644
--- a/test/ruby/test_extlibs.rb
+++ b/test/ruby/test_extlibs.rb
@@ -13,7 +13,7 @@ class TestExtLibs < Test::Unit::TestCase
log = #{log.dump}
msg = proc {
"extension library `#{ext}' is not found#{add_msg}\n" <<
- (File.exist?(log) ? File.read(log) : "\#{log} not found")
+ (File.exist?(log) ? File.binread(log) : "\#{log} not found")
}
assert_nothing_raised(msg) do
require "#{ext}"
</code></pre>
<p>という変更で想定通りに見える failure になおります。</p>
Ruby master - Bug #10276 (Rejected): nil/true/false に singleton メソッドを定義できてしまう
https://bugs.ruby-lang.org/issues/10276
2014-09-21T09:37:02Z
znz (Kazuhiro NISHIYAMA)
<p>nil/true/false が frozen object なのに singleton メソッドを定義できてしまいます。</p>
<pre><code>% cat /tmp/f.rb
def d(o)
p o.frozen?
def o.m; end
rescue
p [o, $!]
end
d(:sym)
d(1)
d(nil)
d(true)
d(false)
d(Object.new.freeze)
% ruby -v /tmp/f.rb
ruby 2.2.0dev (2014-09-21 trunk 47672) [x86_64-linux]
true
[:sym, #<TypeError: can't define singleton>]
true
[1, #<TypeError: can't define singleton>]
true
true
true
true
[#<Object:0x00000002706730>, #<RuntimeError: can't modify frozen object>]
</code></pre>
Ruby master - Bug #9833 (Closed): OpenSSL::X509::Certificate#inspect がわかりにくくなっている
https://bugs.ruby-lang.org/issues/9833
2014-05-13T09:01:43Z
znz (Kazuhiro NISHIYAMA)
<p>SSL/TLS の証明書の簡易的なチェックに OpenSSL::X509::Certificate#inspect を便利に使っていたのですが、最近の ruby だと subject などに内容が出なくなってわかりにくくなっているのですが、以前のように内容が出た方が良いと思うのですが、どうでしょうか。</p>
<pre><code>% cat inspect_cert.rb
#!/usr/bin/env ruby
require 'openssl'
require 'socket'
host = ARGV.shift
port = ARGV.shift.to_i
sock = TCPSocket.open(host, port)
ssl = OpenSSL::SSL::SSLSocket.new(sock)
ssl.connect
p ssl.peer_cert
% ruby1.9.1 -v inspect_cert.rb www.ruby-lang.org 443
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
#<OpenSSL::X509::Certificate subject=/OU=Domain Control Validated/CN=*.ruby-lang.org, issuer=/C=BE/O=GlobalSign nv-sa/CN=GlobalSign Domain Validation CA - SHA256 - G2, serial=1492412345881966875081918063955459968936780, not_before=2014-04-12 01:22:02 UTC, not_after=2014-08-25 05:22:02 UTC>
% ruby -v inspect_cert.rb www.ruby-lang.org 443
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-linux]
#<OpenSSL::X509::Certificate subject=#<OpenSSL::X509::Name:0x007f9b7960b230>, issuer=#<OpenSSL::X509::Name:0x007f9b7960b1b8>, serial=#<OpenSSL::BN:0x007f9b7960b140>, not_before=2014-04-12 01:22:02 UTC, not_after=2014-08-25 05:22:02 UTC>
</code></pre>
Ruby master - Bug #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 #8819 (Closed): ChangeLog includes non us-ascii character
https://bugs.ruby-lang.org/issues/8819
2013-08-26T10:13:43Z
znz (Kazuhiro NISHIYAMA)
<p>ChangeLog should be us-ascii because local variables for emacs set "coding: us-ascii".</p>
<p>% ruby -e 'ARGF.each_line{|line|p line.b unless line.force_encoding("us-ascii").valid_encoding?}' ChangeLog<br>
"\t Patches by David Rodr\xC3\xADguez <a href="/issues/8802">[ruby-core:56734]</a> [Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Minor improvements in socket extension docs (Closed)" href="https://bugs.ruby-lang.org/issues/8802">#8802</a>]\n"</p>
Ruby master - Feature #8786 (Open): Process.clock_gettime(:realtime)
https://bugs.ruby-lang.org/issues/8786
2013-08-15T22:33:13Z
znz (Kazuhiro NISHIYAMA)
<p>Socket や IO#seek のように Process.clock_gettime の第一引数も Symbol で :realtime などを受け付けると良いのではないでしょうか。</p>
Ruby master - Bug #8712 (Closed): Couldn't find file to include 'sample/curses/*.rb'
https://bugs.ruby-lang.org/issues/8712
2013-07-31T23:17:38Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
When builddir is not srcdir, failed to include from curses.c.</p>
<p>Generating RDoc documentation<br>
Parsing sources...<br>
Couldn't find file to include 'sample/curses/hello.rb' from .../ruby/ext/curses/curses.c<br>
Couldn't find file to include 'sample/curses/rain.rb' from .../ruby/ext/curses/curses.c<br>
Couldn't find file to include 'sample/curses/mouse.rb' from .../ruby/ext/curses/curses.c<br>
=end</p>
Ruby master - Feature #8324 (Rejected): Net::Telnet.new のオプション
https://bugs.ruby-lang.org/issues/8324
2013-04-25T11:58:08Z
znz (Kazuhiro NISHIYAMA)
<p>Net::Telnet.new はオプションのハッシュのキーとして String だけ受け付けるようになっていますが、 Symbol も受け付けるようにしてほしいです。</p>
Ruby master - Bug #8010 (Closed): Enumerator#with_index(large_number)
https://bugs.ruby-lang.org/issues/8010
2013-03-04T20:18:03Z
znz (Kazuhiro NISHIYAMA)
<p>Enumerator#with_index の引数で大きな数を指定するとマイナスになったり例外になったりするのはバグでしょうか?</p>
<p>% ruby -ve 'p 3.times.with_index(1<<61).to_a'<br>
ruby 2.1.0dev (2013-03-04 trunk 39580) [x86_64-linux]<br>
[[0, 2305843009213693952], [1, 2305843009213693953], [2, 2305843009213693954]]<br>
% ruby -ve 'p 3.times.with_index(1<<62).to_a'<br>
ruby 2.1.0dev (2013-03-04 trunk 39580) [x86_64-linux]<br>
[[0, -4611686018427387904], [1, -4611686018427387903], [2, -4611686018427387902]]<br>
% ruby -ve 'p 3.times.with_index(1<<63).to_a'<br>
ruby 2.1.0dev (2013-03-04 trunk 39580) [x86_64-linux]<br>
-e:1:in <code>with_index': bignum too big to convert into </code>long' (RangeError)<br>
from -e:1:in <code>each' from -e:1:in </code>to_a'<br>
from -e:1:in `'</p>
Ruby master - Bug #7770 (Closed): rand(range) is not document
https://bugs.ruby-lang.org/issues/7770
2013-02-01T23:52:23Z
znz (Kazuhiro NISHIYAMA)
<p>Random#rand(range) is written in RDoc of random_rand, but rand(range) is not written in RDoc of rb_f_rand.</p>
Ruby master - Bug #6597 (Closed): README.EXT と README.EXT.ja の内容が違う
https://bugs.ruby-lang.org/issues/6597
2012-06-16T00:51:36Z
znz (Kazuhiro NISHIYAMA)
<p>r35977 で README.EXT だけ変更されているので README.EXT.ja も更新が必要だと思います。</p>
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>
Ruby master - Bug #4187 (Closed): Error: test_starttls(IMAPTest)
https://bugs.ruby-lang.org/issues/4187
2010-12-23T07:46:08Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
test_starttls で Error になります。<br>
IOError の方が多いのですが、何度か実行していると OpenSSL::SSL::SSLError になることもあるようです。<br>
表面化するようになった理由は <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Failure: test_imaps_with_ca_file(IMAPTest) (Closed)" href="https://bugs.ruby-lang.org/issues/4186">#4186</a> と同じ証明書の期限切れのようです。</p>
<p>assert がないのでエラーになった方が良いのかもしれませんが、 imap.logout と imap.disconnect の<br>
ところに imap.disconnected? のチェックを追加するとエラーにならなくなるようです。</p>
<ol start="2">
<li>
<p>Error:<br>
test_starttls(IMAPTest):<br>
IOError: closed stream<br>
test/net/imap/test_imap.rb:440:in <code>ensure in starttls_test' test/net/imap/test_imap.rb:440:in </code>starttls_test'<br>
test/net/imap/test_imap.rb:109:in `test_starttls'</p>
</li>
<li>
<p>Error:<br>
test_starttls(IMAPTest):<br>
OpenSSL::SSL::SSLError: SSL_write:: certificate verify failed<br>
test/net/imap/test_imap.rb:438:in <code>starttls_test' test/net/imap/test_imap.rb:109:in </code>test_starttls'</p>
</li>
</ol>
<p>diff --git a/test/net/imap/test_imap.rb b/test/net/imap/test_imap.rb<br>
index 8ccec64..01982ab 100644<br>
--- a/test/net/imap/test_imap.rb<br>
+++ b/test/net/imap/test_imap.rb<br>
@@ -435,9 +435,9 @@ class IMAPTest < Test::Unit::TestCase<br>
begin<br>
begin<br>
imap = yield(port)</p>
<ul>
<li>
<pre><code> imap.logout
</code></pre>
</li>
</ul>
<ul>
<li>
<pre><code> imap.logout if !imap.disconnected?
ensure
</code></pre>
</li>
</ul>
<ul>
<li>
<pre><code> imap.disconnect if imap
</code></pre>
</li>
</ul>
<ul>
<li>
<pre><code> imap.disconnect if imap && !imap.disconnected?
end
</code></pre>
ensure<br>
server.close<br>
=end</li>
</ul>
Ruby master - Bug #4186 (Closed): Failure: test_imaps_with_ca_file(IMAPTest)
https://bugs.ruby-lang.org/issues/4186
2010-12-23T07:27:14Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
証明書 (test/net/imap/cacert.pem) の期限切れでテストが失敗するようになっています。</p>
<ol>
<li>Failure:<br>
test_imaps_with_ca_file(IMAPTest) [/home/chkbuild/tmp/build/ruby-trunk/20101221T223930Z/ruby/test/net/imap/test_imap.rb:66]:<br>
Exception raised:<br>
<#<OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed>>.<br>
=end</li>
</ol>
Ruby master - Bug #4144 (Closed): check_signedness("size_t")
https://bugs.ruby-lang.org/issues/4144
2010-12-10T11:26:51Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
ext/iconv で<br>
.../ext/iconv/iconv.c:481:5: warning: "SIGNEDNESS_OF_SIZE_T" is not defined<br>
という警告が出ていたので調べてみたところ、 check_signedness がおかしいようです。</p>
<p>% ruby-trunk -v -r mkmf -e 'check_signedness("size_t")'<br>
ruby 1.9.3dev (2010-12-10 trunk 30157) [i686-linux]<br>
checking signedness of size_t... failed<br>
% cat mkmf.log<br>
check_signedness: checking signedness of size_t... -------------------- failed</p>
<p>"gcc -o conftest -I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1/i686-linux -I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1/ruby/backward -I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -O2 -fno-tree-pre -g3 -ggdb -DRUBY_DEBUG_ENV -Wall -Wformat=2 -Wundef -Wno-parentheses -fPIC conftest.c -L. -L/home/kazu/opt/ruby-trunk/lib -Wl,-R/home/kazu/opt/ruby-trunk/lib -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/kazu/opt/ruby-trunk/lib -L/home/kazu/opt/ruby-trunk/lib -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc"<br>
checked program was:<br>
/* begin <em>/<br>
1: #include "ruby.h"<br>
2:<br>
3: int main() {return 0;}<br>
/</em> end */</p>
<p>"gcc -I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1/i686-linux -I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1/ruby/backward -I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -O2 -fno-tree-pre -g3 -ggdb -DRUBY_DEBUG_ENV -Wall -Wformat=2 -Wundef -Wno-parentheses -fPIC -c conftest.c"<br>
conftest.c:4: error: ‘rbcv_typedef_’ undeclared here (not in a function)<br>
checked program was:<br>
/* begin <em>/<br>
1: #include "ruby.h"<br>
2:<br>
3: /<em>top</em>/<br>
4: int conftest_const[((rbcv_typedef_)-1 < 0) ? 1 : -1];<br>
/</em> end */</p>
<p>"gcc -I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1/i686-linux -I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1/ruby/backward -I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -O2 -fno-tree-pre -g3 -ggdb -DRUBY_DEBUG_ENV -Wall -Wformat=2 -Wundef -Wno-parentheses -fPIC -c conftest.c"<br>
conftest.c:4: error: ‘rbcv_typedef_’ undeclared here (not in a function)<br>
checked program was:<br>
/* begin <em>/<br>
1: #include "ruby.h"<br>
2:<br>
3: /<em>top</em>/<br>
4: int conftest_const[((rbcv_typedef_)-1 > 0) ? 1 : -1];<br>
/</em> end */</p>
<hr>
<p>%<br>
=end</p>
Ruby master - Bug #4143 (Closed): warning: "SUPPORT_JOKE" is not defined
https://bugs.ruby-lang.org/issues/4143
2010-12-10T11:18:05Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
chkbuild で以前から<br>
id.h:110:5: warning: "SUPPORT_JOKE" is not defined<br>
id.h:116:5: warning: "SUPPORT_JOKE" is not defined<br>
という警告が出ているのですが、id.h で「#if SUPPORT_JOKE」として参照しているのに<br>
SUPPORT_JOKE を #define している vm_opts.h を include せずに id.h だけを<br>
include しているファイルがあるからのようです。<br>
(debug.c のように vm_core.h 経由で vm_opts.h を include した後に id.h を<br>
include しているものもある。)</p>
<p>というわけで以下の修正で警告は出なくなるようです。</p>
<p>diff --git a/template/id.h.tmpl b/template/id.h.tmpl<br>
index b91292a..29548de 100644<br>
--- a/template/id.h.tmpl<br>
+++ b/template/id.h.tmpl<br>
@@ -50,6 +50,8 @@ end<br>
#include "parse.h"<br>
#endif</p>
<p>+#include "vm_opts.h" /* for SUPPORT_JOKE */<br>
+<br>
#define symIFUNC ID2SYM(idIFUNC)<br>
#define symCFUNC ID2SYM(idCFUNC)<br>
=end</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>
Ruby master - Bug #3857 (Closed): OpenSSL::TestUtils.silent が $VERBOSE を戻していない
https://bugs.ruby-lang.org/issues/3857
2010-09-22T17:06:50Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
OpenSSL::TestUtils.silent が $VERBOSE を戻していないので他のテストに影響が出ることがあったようです。<br>
問題なさそうならコミットしておきます。</p>
<a name="Index-testopensslutilsrb"></a>
<h1 >Index: test/openssl/utils.rb<a href="#Index-testopensslutilsrb" class="wiki-anchor">¶</a></h1>
<p>--- test/openssl/utils.rb (revision 29315)<br>
+++ test/openssl/utils.rb (working copy)<br>
@@ -138,7 +138,7 @@<br>
back, $VERBOSE = $VERBOSE, nil<br>
yield<br>
ensure</p>
<ul>
<li>
<pre><code> $VERBOSE = back if back
</code></pre>
</li>
</ul>
<ul>
<li>
<pre><code> $VERBOSE = back
</code></pre>
end<br>
end<br>
end<br>
=end</li>
</ul>
Ruby master - Bug #3471 (Rejected): ./miniruby sample/test.rbで1NotOK
https://bugs.ruby-lang.org/issues/3471
2010-06-24T16:41:11Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
<a href="http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/last#test.rb" class="external">http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/last#test.rb</a><br>
( <a href="http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20100624T113600.log.txt.gz" class="external">http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20100624T113600.log.txt.gz</a> )<br>
で「Fnot ok system 9 -- sample/test.rb:1950:in `'」になっています。</p>
<p>for script in Dir["#{dir}{lib,sample,ext,test}/**/*.rb"].sort<br>
unless valid_syntax? IO::read(script), script<br>
STDERR.puts script<br>
$bad = true<br>
end<br>
end<br>
test_ok(!$bad)</p>
<p>の $bad = true のあたりで終了するようにして試したところ、</p>
<p>"ext/tk/sample/demos-jp/anilabel.rb"<br>
unknown encoding name: euc-jp<br>
ext/tk/sample/demos-jp/anilabel.rb</p>
<p>で $bad = true になっているようです。<br>
=end</p>
Ruby master - Bug #3245 (Closed): Expected "ccache gcc" to be nil.
https://bugs.ruby-lang.org/issues/3245
2010-05-04T06:48:41Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
When CC environment variable set, some tests of rake are failed.</p>
<p>% ruby-trunk -v<br>
ruby 1.9.2dev (2010-05-04 trunk 27602) [x86_64-linux]<br>
% echo $CC<br>
ccache gcc<br>
% ruby-trunk test/rake/test_task_arguments.rb<br>
Loaded suite test/rake/test_task_arguments<br>
Started<br>
....F...F.F.<br>
Finished in 0.001460 seconds.</p>
<ol>
<li>
<p>Failure:<br>
test_default_arguements_that_dont_match_names_are_ignored(Rake::TestTaskArguments) [test/rake/test_task_arguments.rb:85]:<br>
Expected "ccache gcc" to be nil.</p>
</li>
<li>
<p>Failure:<br>
test_extra_names_are_nil(Rake::TestTaskArguments) [test/rake/test_task_arguments.rb:48]:<br>
Expected "ccache gcc" to be nil.</p>
</li>
<li>
<p>Failure:<br>
test_named_args(Rake::TestTaskArguments) [test/rake/test_task_arguments.rb:38]:<br>
Expected "ccache gcc" to be nil.</p>
</li>
</ol>
<p>12 tests, 23 assertions, 3 failures, 0 errors, 0 skips</p>
<p>Test run options: --seed 14032<br>
%<br>
=end</p>
Ruby master - Bug #3168 (Closed): TypeError in Timeout.timeout
https://bugs.ruby-lang.org/issues/3168
2010-04-19T08:00:06Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
<a href="http://d.hatena.ne.jp/moro/20100416/1271410920" class="external">http://d.hatena.ne.jp/moro/20100416/1271410920</a> で知ったのですが、timeout待ち用のスレッドが sleep の例外を無視してるのはまずいのではないでしょうか?</p>
<p>diff --git a/test/test_timeout.rb b/test/test_timeout.rb<br>
index 9ec9c02..472e7ad 100644<br>
--- a/test/test_timeout.rb<br>
+++ b/test/test_timeout.rb<br>
@@ -23,4 +23,12 @@ class TestTimeout < Test::Unit::TestCase<br>
end<br>
assert @flag, "<a href="/issues/1402">[ruby-dev:38319]</a>"<br>
end<br>
+</p>
<ul>
<li>def test_cannot_convert_into_time_interval</li>
<li>aoe = Thread.abort_on_exception</li>
<li>Thread.abort_on_exception = true</li>
<li>Timeout.timeout(1.i) { sleep 0.1 }</li>
<li>ensure</li>
<li>Thread.abort_on_exception = aoe</li>
<li>end<br>
end<br>
=end</li>
</ul>
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>
Ruby master - Bug #3127 (Closed): Encoding#replicate(non_string)
https://bugs.ruby-lang.org/issues/3127
2010-04-11T11:53:53Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
Encoding#replicate(name) に String 以外のオブジェクトを渡すと落ちます。</p>
<p>% ruby-trunk -e 'Encoding::UTF_8.replicate(0)'<br>
-e:1: [BUG] Segmentation fault<br>
ruby 1.9.2dev (2010-04-11 trunk 27297) [i686-linux]</p>
<h2>-- control frame ----------<br>
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :replicate<br>
c:0003 p:0019 s:0006 b:0006 l:000344 d:0008ac EVAL -e:1<br>
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH<br>
c:0001 p:0000 s:0002 b:0002 l:000344 d:000344 TOP</h2>
<p>-- Ruby level backtrace information ----------------------------------------<br>
-e:1:in <code><main>' -e:1:in </code>replicate'</p>
<p>-- C level backtrace information -------------------------------------------<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_vm_bugreport+0x72) [0xb7820102]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb771e45f]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_bug+0x3a) [0xb771e4fa]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb77bbfe4]<br>
[0xb7893410]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb780af83]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7818f02]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb781085c]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7816994]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_iseq_eval_main+0xab) [0xb7816c6b]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb772123a]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(ruby_exec_node+0x25) [0xb7721275]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(ruby_run_node+0x35) [0xb7722875]<br>
ruby-trunk(main+0x7e) [0x804886e]<br>
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb750bb56]<br>
ruby-trunk [0x8048751]</p>
<p>[NOTE]<br>
You may have encountered a bug in the Ruby interpreter or extension libraries.<br>
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><br>
=end</p>
Ruby master - Bug #3123 (Closed): uninitialized constant Object::C (NameError)
https://bugs.ruby-lang.org/issues/3123
2010-04-11T08:43:47Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
いつの間にかトップレベルでの uninitialized constant で Object:: が付くようになってしまっています。</p>
<p>% ruby-trunk -ve C<br>
ruby 1.9.2dev (2010-04-10 trunk 27284) [x86_64-linux]<br>
-e:1:in `': uninitialized constant Object::C (NameError)<br>
%</p>
<p>どこからなのか git bisect で調べてみたところ r25984 からのようです。<br>
=end</p>
Ruby master - Bug #3055 (Closed): NEWS: URI Obsoleted methods
https://bugs.ruby-lang.org/issues/3055
2010-03-30T21:04:16Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
URI に</p>
<ul>
<li>Obsoleted methods:
<ul>
<li>URI#escape</li>
<li>URI#unescape<br>
とありますが、</li>
<li>URI.escape</li>
<li>URI.unescape<br>
ではないでしょうか?</li>
</ul>
</li>
</ul>
<p>それから URI.encode と URI.decode でも警告が出ますが、この2個のメソッドも obsolete なのでしょうか?</p>
<p>% ruby-trunk -v -r uri -e 'URI.escape("");URI.unescape("");URI.encode("");URI.decode("")'<br>
ruby 1.9.2dev (2010-03-30 trunk 27097) [x86_64-linux]<br>
-e:1:in <code><main>': warning: URI.escape is obsolete -e:1:in </code>': warning: URI.unescape is obsolete<br>
-e:1:in <code><main>': warning: URI.escape is obsolete -e:1:in </code>': warning: URI.unescape is obsolete<br>
%<br>
=end</p>
Ruby master - Bug #2735 (Closed): miniruby make failed on powerpc-darwin9.8.0
https://bugs.ruby-lang.org/issues/2735
2010-02-11T19:18:49Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
powerpc の Mac OS X で miniruby の make に失敗します。</p>
<p>IRC で教えてもらった話だと r26401 での修正漏れで missing/alloca.c の<br>
RUBY_LIB を RUBY_LIB_PREFIX にするだけで良さそうと言う話で、<br>
実際に試してみたところ、make 出来るようになったので後でコミットします。</p>
<p>gcc -O2 -g -W -Wall -Wformat=2 -Wundef -Wno-parentheses -Wno-unused-parameter -Wno-missing-field-initializers -pipe -L. -Wl,-u,_objc_msgSend main.o dmydln.o dmyencoding.o dmyversion.o miniprelude.o array.o bignum.o class.o compar.o complex.o dir.o enum.o enumerator.o error.o eval.o load.o proc.o file.o gc.o hash.o inits.o io.o marshal.o math.o node.o numeric.o object.o pack.o parse.o process.o random.o range.o rational.o re.o regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o safe.o signal.o sprintf.o st.o strftime.o string.o struct.o time.o transcode.o util.o variable.o compile.o debug.o iseq.o vm.o vm_dump.o thread.o cont.o ascii.o us_ascii.o unicode.o utf_8.o newline.o alloca.o dmyext.o -lpthread -ldl -lobjc -o miniruby<br>
Undefined symbols:<br>
"_xfree", referenced from:<br>
_alloca in alloca.o<br>
"_xmalloc", referenced from:<br>
_alloca in alloca.o<br>
ld: symbol(s) not found<br>
collect2: ld returned 1 exit status<br>
make: *** [miniruby] Error 1<br>
exit 2</p>
<a name="Index-missingallocac"></a>
<h1 >Index: missing/alloca.c<a href="#Index-missingallocac" class="wiki-anchor">¶</a></h1>
<p>--- missing/alloca.c (revision 26632)<br>
+++ missing/alloca.c (working copy)<br>
@@ -54,7 +54,7 @@</p>
<p>#define NULL 0 /* null pointer constant */</p>
<p>-#ifdef RUBY_LIB<br>
+#ifdef RUBY_LIB_PREFIX<br>
#define xmalloc ruby_xmalloc<br>
#define xfree ruby_xfree<br>
#endif<br>
=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 master - Bug #2664 (Closed): Failure: test_segv_test(TestRubyOptions)
https://bugs.ruby-lang.org/issues/2664
2010-01-27T08:44:46Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
環境によって「-- Ruby level backtrace information-----------------------------------------」が出たり出なかったりして、出る環境では test/ruby/test_rubyoptions.rb の test_segv_test が Failure になります。</p>
<p>% ruby-trunk -e 'Process.kill :SEGV, $$' 2>&1 | head<br>
-e:1: [BUG] Segmentation fault<br>
ruby 1.9.2dev (2010-01-27 trunk 26434) [x86_64-linux]</p>
<h2>-- control frame ----------<br>
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :kill<br>
c:0003 p:0019 s:0006 b:0006 l:002058 d:001bc8 EVAL -e:1<br>
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH<br>
c:0001 p:0000 s:0002 b:0002 l:002058 d:002058 TOP</h2>
<p>-- Ruby level backtrace information-----------------------------------------</p>
<p>出たり出なかったりする原因は rb_vm_bugreport の i が初期化されていないからのように見えます。</p>
<p>テストも含めて以下のような修正でどうでしょうか?</p>
<a name="Index-vm_dumpc"></a>
<h1 >Index: vm_dump.c<a href="#Index-vm_dumpc" class="wiki-anchor">¶</a></h1>
<p>--- vm_dump.c (revision 26436)<br>
+++ vm_dump.c (working copy)<br>
@@ -571,8 +571,8 @@<br>
bugreport_backtrace(void <em>arg, VALUE file, int line, VALUE method)<br>
{<br>
if (!</em>(int *)arg) {</p>
<ul>
<li>fprintf(stderr, "-- Ruby level backtrace information"</li>
<li>
<pre><code> "-----------------------------------------\n");
</code></pre>
</li>
</ul>
<ul>
<li>fprintf(stderr, "-- Ruby level backtrace information "</li>
<li>
<pre><code> "----------------------------------------\n");
</code></pre>
*(int *)arg = 1;<br>
}<br>
fprintf(stderr, "%s:%d:in `%s'\n", RSTRING_PTR(file), line, RSTRING_PTR(method));<br>
@@ -586,7 +586,7 @@<br>
rb_vm_bugreport(void)<br>
{<br>
if (GET_THREAD()->vm) {</li>
</ul>
<ul>
<li>int i;</li>
</ul>
<ul>
<li>
<p>int i = 0;<br>
SDR();</p>
<p>if (rb_backtrace_each(bugreport_backtrace, &i)) {<br>
Index: test/ruby/test_rubyoptions.rb<br>
===================================================================<br>
--- test/ruby/test_rubyoptions.rb (revision 26436)<br>
+++ test/ruby/test_rubyoptions.rb (working copy)<br>
@@ -333,6 +333,7 @@<br>
--\scontrol\sframe\s----------\n<br>
(?:c:.<em>\n)</em><br>
---------------------------\n</p>
</li>
<li>
<pre><code> --\sRuby\slevel\sbacktrace\sinformation\s----------------------------------------\n
-e:1:in\s`<main>'\n
-e:1:in\s`kill'\n\n
(?:
</code></pre>
</li>
</ul>
<p>=end</p>
Ruby master - Bug #2111 (Closed): Error:test_rm_f(TestFileUtils)
https://bugs.ruby-lang.org/issues/2111
2009-09-18T06:25:40Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
rm_f の引数の意味が FileUtils.rm_f と mkmf.rb の rm_f で違うため、<br>
mkmf と rake が require されていると test_rm_f が mkmf.rb の<br>
rm_f で Dir[*files] の files が配列の配列になっていてエラーになります。</p>
<p>rm_f の違いとしては FileUtils.rm_f は<br>
rm_f(list, options = {})<br>
で複数ファイルは配列でしか指定できないのに対して、<br>
mkmf.rb の方の rm_f は<br>
rm_f(*files)<br>
となっていて、複数引数でも指定できるようになっています。</p>
<p>さらに mkmf.rb の方は Dir.[] も通すので、グロブの<br>
ワイルドカードなどになる文字が含まれているときの<br>
挙動が変わると思います。</p>
<p>% ruby-trunk -r rake -r mkmf -v test/fileutils/test_fileutils.rb -n test_rm_f<br>
ruby 1.9.2dev (2009-09-17 trunk 24982) [i686-linux]<br>
Loaded suite test/fileutils/test_fileutils<br>
Started<br>
cp data/a tmp/rmsrc<br>
cp data/all tmp/rmsrc<br>
cp data/random tmp/rmsrc<br>
cp data/zero tmp/rmsrc<br>
E<br>
Finished in 0.013124 seconds.</p>
<ol>
<li>Error:<br>
test_rm_f(TestFileUtils):<br>
TypeError: can't convert Array into String<br>
test/fileutils/test_fileutils.rb:425:in `test_rm_f'</li>
</ol>
<p>1 tests, 7 assertions, 0 failures, 1 errors, 0 skips<br>
%<br>
=end</p>
Ruby master - Bug #2005 (Closed): abort at TestRand#test_random_range
https://bugs.ruby-lang.org/issues/2005
2009-08-27T13:29:27Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
TestRand#test_random_range で abort します。</p>
<p>% ruby-trunk ~/wc/ruby/trunk/test/ruby/test_rand.rb -v -n test_random_range<br>
Loaded suite /home/kazu/wc/ruby/trunk/test/ruby/test_rand<br>
Started<br>
TestRand#test_random_range: /home/kazu/wc/ruby/trunk/test/ruby/test_rand.rb:354: [BUG] Segmentation fault<br>
ruby 1.9.2dev (2009-08-27 trunk 24680) [i686-linux]</p>
<h2>-- control frame ----------<br>
c:0017 p:---- s:0062 b:0062 l:000061 d:000061 CFUNC :rand<br>
c:0016 p:0049 s:0058 b:0056 l:000047 d:000055 BLOCK /home/kazu/wc/ruby/trunk/test/ruby/test_rand.rb:354<br>
c:0015 p:---- s:0053 b:0053 l:000052 d:000052 FINISH<br>
c:0014 p:---- s:0051 b:0051 l:000050 d:000050 CFUNC :each<br>
c:0013 p:0071 s:0048 b:0048 l:000047 d:000047 METHOD /home/kazu/wc/ruby/trunk/test/ruby/test_rand.rb:352<br>
c:0012 p:0062 s:0043 b:0043 l:000042 d:000042 METHOD /home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/minitest/unit.rb:458<br>
c:0011 p:0090 s:0037 b:0037 l:000018 d:000036 BLOCK /home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/minitest/unit.rb:426<br>
c:0010 p:---- s:0032 b:0032 l:000031 d:000031 FINISH<br>
c:0009 p:---- s:0030 b:0030 l:000029 d:000029 CFUNC :each<br>
c:0008 p:0026 s:0027 b:0027 l:000018 d:000026 BLOCK /home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/minitest/unit.rb:420<br>
c:0007 p:---- s:0024 b:0024 l:000023 d:000023 FINISH<br>
c:0006 p:---- s:0022 b:0022 l:000021 d:000021 CFUNC :each<br>
c:0005 p:0080 s:0019 b:0019 l:000018 d:000018 METHOD /home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/minitest/unit.rb:419<br>
c:0004 p:0153 s:0014 b:0014 l:000013 d:000013 METHOD /home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/minitest/unit.rb:393<br>
c:0003 p:0041 s:0007 b:0007 l:0013fc d:000006 BLOCK /home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/minitest/unit.rb:334<br>
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH<br>
c:0001 p:0000 s:0002 b:0002 l:001ae4 d:001ae4 TOP</h2>
<p>/home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/minitest/unit.rb:334:in <code>block in autorun' /home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/minitest/unit.rb:393:in </code>run'<br>
/home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/minitest/unit.rb:419:in <code>run_test_suites' /home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/minitest/unit.rb:419:in </code>each'<br>
/home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/minitest/unit.rb:420:in <code>block in run_test_suites' /home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/minitest/unit.rb:420:in </code>each'<br>
/home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/minitest/unit.rb:426:in <code>block (2 levels) in run_test_suites' /home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/minitest/unit.rb:458:in </code>run'<br>
/home/kazu/wc/ruby/trunk/test/ruby/test_rand.rb:352:in <code>test_random_range' /home/kazu/wc/ruby/trunk/test/ruby/test_rand.rb:352:in </code>each'<br>
/home/kazu/wc/ruby/trunk/test/ruby/test_rand.rb:354:in <code>block in test_random_range' /home/kazu/wc/ruby/trunk/test/ruby/test_rand.rb:354:in </code>rand'</p>
<p>-- C level backtrace information -------------------------------------------<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_vm_bugreport+0x65) [0xb7f167c5]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7e29d6f]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_bug+0x39) [0xb7e29e09]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7ebaf2d]<br>
[0xb7f75440]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f05555]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f07184]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f1505d]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f0c365]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f118bc]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f11ea6]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_yield+0x59) [0xb7f128f9]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_ary_each+0x52) [0xb7e00fa2]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f0553c]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f07184]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f1505d]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f0c365]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f118bc]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f11ea6]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_yield+0x59) [0xb7f128f9]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_ary_each+0x52) [0xb7e00fa2]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f0553c]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f07184]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f1505d]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f0c365]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f118bc]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f11ea6]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_yield+0x59) [0xb7f128f9]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_ary_each+0x52) [0xb7e00fa2]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f0553c]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f07184]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f1505d]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f0c365]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f118bc]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f11ea6]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_vm_invoke_proc+0x8d) [0xb7f1238d]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_proc_call+0x56) [0xb7e308e6]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_call_end_proc+0x26) [0xb7e2d346]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_exec_end_proc+0x17c) [0xb7e2d0bc]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7e2d196]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(ruby_cleanup+0x92) [0xb7e2d6a2]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(ruby_run_node+0x5c) [0xb7e2d8bc]<br>
ruby-trunk(main+0x8a) [0x804880a]<br>
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7c19450]<br>
ruby-trunk [0x8048711]</p>
<p>[NOTE]<br>
You may have encountered a bug in the Ruby interpreter or extension libraries.<br>
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>%<br>
=end</p>
Ruby master - Bug #1904 (Rejected): cmp required?
https://bugs.ruby-lang.org/issues/1904
2009-08-07T01:34:44Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
ほぼ最小限のcygwin環境でtrunkのビルドを試そうとしてみたところ、cmpかgperfもなくて止まってしまったのですが、cmpが必須になったのでしょうか?</p>
<p>ccache gcc -O3 -g -Wall -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -<br>
Wwrite-strings -I. -I.ext/include/i386-cygwin -I/home/kazu/wc/ruby/trunk/include<br>
-I/home/kazu/wc/ruby/trunk -DRUBY_EXPORT -o pack.o -c /home/kazu/wc/ruby/trun<br>
k/pack.c<br>
/bin/sh: line 1: cmp: command not found</p>
<ul>
<li>gperf -C -p -j1 -i 1 -g -o -t -N rb_reserved_word '-k1,3,$' /home/kazu/wc/ruby<br>
/trunk/defs/keywords<br>
/bin/sh: line 6: gperf: command not found<br>
make: *** [lex.c] Error 127<br>
=end</li>
</ul>
Ruby master - Bug #1851 (Rejected): make install problems using mingw on fedora 11
https://bugs.ruby-lang.org/issues/1851
2009-08-01T10:04:29Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
Fedora 11 の MinGW を使ってクロスコンパイルしてみたところ、<br>
make installの時に./tool/rbinstall.rbで警告が出ます。<br>
それから、RDocの生成に失敗します。</p>
<p>svn co <a href="http://svn.ruby-lang.org/repos/ruby/trunk" class="external">http://svn.ruby-lang.org/repos/ruby/trunk</a> ruby-trunk<br>
cd ruby-trunk<br>
autoconf<br>
mingw32-configure<br>
make</p>
<p>$ make DESTDIR=$HOME/ruby-mingw32 install<br>
ruby -I.../ruby-trunk -ri386-mingw32-fake ./tool/rbinstall.rb --make="make" --dest-dir=".../ruby-mingw32" --extout=".ext" --mflags="" --make-flags="DESTDIR=.../ruby-mingw32" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc"<br>
installing binary commands: /usr/i686-pc-mingw32/sys-root/mingw/bin<br>
installing base libraries: /usr/i686-pc-mingw32/sys-root/mingw/lib<br>
installing arch files: /usr/i686-pc-mingw32/sys-root/mingw/lib/ruby/1.9.1/i386-mingw32<br>
installing command scripts: /usr/i686-pc-mingw32/sys-root/mingw/bin<br>
installing library scripts: /usr/i686-pc-mingw32/sys-root/mingw/lib/ruby/1.9.1<br>
installing common headers: /usr/i686-pc-mingw32/sys-root/mingw/include/ruby-1.9.1<br>
installing manpages: /usr/i686-pc-mingw32/sys-root/mingw/share/man/man1<br>
installing extension objects: /usr/i686-pc-mingw32/sys-root/mingw/lib/ruby/1.9.1/i386-mingw32<br>
installing extension objects: /usr/i686-pc-mingw32/sys-root/mingw/lib/ruby/site_ruby/1.9.1/i386-msvcrt<br>
installing extension objects: /usr/i686-pc-mingw32/sys-root/mingw/lib/ruby/vendor_ruby/1.9.1/i386-msvcrt<br>
installing extension headers: /usr/i686-pc-mingw32/sys-root/mingw/include/ruby-1.9.1/i386-mingw32<br>
installing extension scripts: /usr/i686-pc-mingw32/sys-root/mingw/lib/ruby/1.9.1<br>
installing extension scripts: /usr/i686-pc-mingw32/sys-root/mingw/lib/ruby/site_ruby/1.9.1<br>
installing extension scripts: /usr/i686-pc-mingw32/sys-root/mingw/lib/ruby/vendor_ruby/1.9.1<br>
installing extension headers: /usr/i686-pc-mingw32/sys-root/mingw/include/ruby-1.9.1/ruby<br>
installing default gems: /usr/i686-pc-mingw32/sys-root/mingw/lib/ruby/gems/1.9.1 (cache, doc, gems, specifications)<br>
./tool/rbinstall.rb:523: warning: multiple values for a block parameter (0 for 1)<br>
from ./tool/rbinstall.rb:246<br>
./tool/rbinstall.rb:523: warning: multiple values for a block parameter (0 for 1)<br>
from ./tool/rbinstall.rb:246<br>
./tool/rbinstall.rb:523: warning: multiple values for a block parameter (0 for 1)<br>
from ./tool/rbinstall.rb:246<br>
Generating RDoc documentation<br>
ruby -I.../ruby-trunk -ri386-mingw32-fake -I<code>cd ./lib; pwd</code> -- "./bin/rdoc" --all --ri --op ".ext/rdoc" "."<br>
.../ruby-trunk/lib/rubygems.rb:191: uninitialized constant Gem::Mutex (NameError)<br>
from .../ruby-trunk/lib/rdoc/ri/paths.rb:55:in <code>require' from .../ruby-trunk/lib/rdoc/ri/paths.rb:55 from .../ruby-trunk/lib/rdoc/options.rb:4:in </code>require'<br>
from .../ruby-trunk/lib/rdoc/options.rb:4<br>
from .../ruby-trunk/lib/rdoc/rdoc.rb:13:in <code>require' from .../ruby-trunk/lib/rdoc/rdoc.rb:13 from ./bin/rdoc:11:in </code>require'<br>
from ./bin/rdoc:11<br>
make: *** [rdoc] エラー 1<br>
$ wine ./ruby.exe -v<br>
ruby 1.9.2dev (2009-08-01 trunk 24343) [i386-mingw32]<br>
$<br>
=end</p>
Ruby master - Bug #1842 (Closed): mspec で SIGABRT
https://bugs.ruby-lang.org/issues/1842
2009-07-31T01:41:53Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
chkbuild のログを見ると mspec で SIGABRT が出ていますが、lib/mspec/mocks/mock.rb の一部の<br>
SpecExpectation.fail_with(<br>
"Mock '#{name_or_inspect obj}' expected to receive '#{key.last}' " <br>
"#{qualifier.to_s.sub('_', ' ')} #{count} times",<br>
"but received it #{proxy.calls} times")<br>
というところで発生していて、さらに絞り込んでみたところ、<br>
"#{}""#{} "<br>
で再現するようです。</p>
<p>% ruby-trunk -e '"#{}""#{} "'<br>
-e: [BUG] Segmentation fault<br>
ruby 1.9.2dev (2009-07-31 trunk 24331) [i686-linux]</p>
<h2>-- control frame ----------<br>
c:0001 p:0000 s:0002 b:0002 l:000ffc d:000ffc TOP</h2>
<p>-- C level backtrace information -------------------------------------------<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_vm_bugreport+0x87) [0xb7f7d367]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7e6e5a9]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_bug+0x42) [0xb7e6e62d]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f0fd89]<br>
[0xb7fdf440]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f57a15]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f57a65]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f606f9]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_iseq_compile_node+0x403) [0xb7f552bc]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f660fb]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_iseq_new_with_opt+0x43) [0xb7f66152]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(rb_iseq_new_main+0x7b) [0xb7f66070]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9 [0xb7f0dbf9]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(ruby_process_options+0x70) [0xb7f0ee06]<br>
/home/kazu/opt/ruby-trunk/lib/libruby.so.1.9(ruby_options+0x99) [0xb7e72aa4]<br>
ruby-trunk(main+0x7c) [0x80487f0]<br>
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7c5e450]<br>
ruby-trunk [0x8048711]</p>
<p>[NOTE]<br>
You may have encountered a bug in the Ruby interpreter or extension libraries.<br>
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><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>
Ruby master - Bug #1483 (Rejected): some commands installed without program-suffix
https://bugs.ruby-lang.org/issues/1483
2009-05-18T17:32:52Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
trunkでrubyとgoruby以外にconfigureで指定した--program-suffixが反映されなくなっているようです。</p>
<p>% \ls $(ruby-trunk -r rbconfig -e 'puts RbConfig::CONFIG["bindir"]')<br>
erb gem goruby-trunk irb rake rdoc ri ruby-trunk testrb<br>
% \ls $(ruby-1.9.1 -r rbconfig -e 'puts RbConfig::CONFIG["bindir"]')<br>
erb-1.9.1 goruby-1.9.1 rake-1.9.1 ri-1.9.1 testrb-1.9.1<br>
gem-1.9.1 irb-1.9.1 rdoc-1.9.1 ruby-1.9.1<br>
%<br>
=end</p>
Ruby master - Bug #1456 (Closed): invalid $LOAD_PATH when configure with --program-suffix
https://bugs.ruby-lang.org/issues/1456
2009-05-11T07:09:44Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
configureに--program-suffix=-trunkをつけている環境で添付ライブラリのインストール先と$LOAD_PATHが一致していません。</p>
<p>% ruby-trunk -run -e 0<br>
ruby-trunk:0:in `require': no such file to load -- un (LoadError)<br>
% ruby-trunk -ve 'puts $LOAD_PATH'<br>
ruby 1.9.2dev (2009-05-10 trunk 23386) [i686-linux]<br>
/home/kazu/opt/ruby-trunk/lib/ruby/site_ruby/1.9.1<br>
/home/kazu/opt/ruby-trunk/lib/ruby/site_ruby/1.9.1/i686-linux<br>
/home/kazu/opt/ruby-trunk/lib/ruby/site_ruby<br>
/home/kazu/opt/ruby-trunk/lib/ruby/vendor_ruby/1.9.1<br>
/home/kazu/opt/ruby-trunk/lib/ruby/vendor_ruby/1.9.1/i686-linux<br>
/home/kazu/opt/ruby-trunk/lib/ruby/vendor_ruby<br>
/home/kazu/opt/ruby-trunk/lib/ruby/1.9.1<br>
/home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/i686-linux<br>
.<br>
% \ls ~/opt/ruby-trunk/lib/ruby*/<br>
/home/kazu/opt/ruby-trunk/lib/ruby-trunk/:<br>
1.9.1</p>
<p>/home/kazu/opt/ruby-trunk/lib/ruby/:<br>
gems site_ruby vendor_ruby<br>
%<br>
=end</p>
Ruby master - Bug #1435 (Closed): README.ja: 「defined(THINK_C)」
https://bugs.ruby-lang.org/issues/1435
2009-05-06T01:21:45Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
「* 移植」のところに</p>
<blockquote>
<p>「defined(THINK_C)」で<br>
括られている部分を参考にしてください</p>
</blockquote>
<p>と書かれていますが、「defined(THINK_C)」がREADME.ja以外に見つかりません。<br>
=end</p>