Ruby Issue Tracking System: Issues
https://bugs.ruby-lang.org/
https://bugs.ruby-lang.org/favicon.ico?1711330511
2022-07-11T02:37:51Z
Ruby Issue Tracking System
Redmine
Ruby master - Bug #18906 (Closed): coverage failed on GItHub Actions
https://bugs.ruby-lang.org/issues/18906
2022-07-11T02:37:51Z
znz (Kazuhiro NISHIYAMA)
<p>coverage failed on GItHub Actions since <a href="https://github.com/ruby/actions/actions/runs/2486933939" class="external">https://github.com/ruby/actions/actions/runs/2486933939</a><br>
(previous <a href="https://github.com/ruby/actions/actions/runs/2486176425" class="external">https://github.com/ruby/actions/actions/runs/2486176425</a> is passed)</p>
<p>A reproduce test is attached.</p>
<pre><code> 1) Failure:
TestCoverage#test_coverage_ensure_if_return [/home/user/ruby/test/coverage/test_coverage.rb:193]:
pid 45865 exit 1
| /tmp/d20220710-45855-exgg7s/test.rb:5:in `flush': no implicit conversion of false into Integer (TypeError)
| from /tmp/d20220710-45855-exgg7s/test.rb:8:in `<top (required)>'
| from -:3:in `require'
| from -:3:in `<main>'
</code></pre>
Ruby master - Bug #18892 (Closed): ARGF.lineno starts from 2 when the file has shebang
https://bugs.ruby-lang.org/issues/18892
2022-07-02T06:11:07Z
znz (Kazuhiro NISHIYAMA)
<p>Since ruby 3.0, <code>ARGF.lineno</code> starts from 2 if the file has shebang.</p>
<p>Following example has <code>#!/usr/bin/env ruby</code>, and it can reproduce with the file has <code>#!</code> only.</p>
<pre><code>$ cat f.rb
#!/usr/bin/env ruby
ARGF.each do
p ARGF.lineno
exit
end
$ RBENV_VERSION=3.1.2 ruby -v f.rb f.rb
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [aarch64-linux]
2
$ RBENV_VERSION=3.0.4 ruby -v f.rb f.rb
ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [aarch64-linux]
2
$ RBENV_VERSION=2.7.6 ruby -v f.rb f.rb
ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [aarch64-linux]
1
</code></pre>
Ruby master - Bug #18887 (Closed): documentation for protected methods
https://bugs.ruby-lang.org/issues/18887
2022-06-29T08:08:57Z
znz (Kazuhiro NISHIYAMA)
<p>I think it is correct before the change.<br>
Which is correct?</p>
<p><a href="https://github.com/ruby/ruby/commit/962a3247b1b76770930200bcce7470a54dfb25c9" class="external">https://github.com/ruby/ruby/commit/962a3247b1b76770930200bcce7470a54dfb25c9</a></p>
Ruby master - Misc #18726 (Closed): CI Error on c99 and c2x
https://bugs.ruby-lang.org/issues/18726
2022-04-14T02:43:20Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://github.com/ruby/ruby/runs/6013849896?check_suite_focus=true" class="external">https://github.com/ruby/ruby/runs/6013849896?check_suite_focus=true</a></p>
<pre><code>checking char bit... 8
checking size of int... 0
checking size of short... 0
checking size of long... 0
configure: error: in `/__w/ruby/ruby/build':
configure: error: cannot compute sizeof (long long)
See `config.log' for more details
checking size of long long...
Error: Process completed with exit code 77.
</code></pre>
<p>I investigate it, the cause is that autoconf is old in <code>ghcr.io/ruby/ruby-ci-image:clang-15</code>. (Autoconf 2.69)<br>
Autoconf 2.71 generates with <code>void</code>.</p>
<p>How to reproduce:</p>
<pre><code> % docker run --rm -it ghcr.io/ruby/ruby-ci-image:clang-15
$ sudo apt update
$ sudo apt install git
$ git clone --depth=1 https://github.com/ruby/ruby $HOME/src
$ mkdir $HOME/build
$ cd $HOME/build
$ ../src/autogen.sh
$ ../src/configure -C --enable-debug-env --disable-install-doc --with-ext=-test-/cxxanyargs,+ --without-valgrind --without-jemalloc --without-gmp --with-gcc="clang-15 -std=c99 -Werror=pedantic -pedantic-errors" --enable-shared optflags=-O1 debugflags=-ggdb3
</code></pre>
<p>Tail of configure output:</p>
<pre><code> checking char bit... 8
checking size of int... 0
checking size of short... 0
checking size of long... 0
checking size of long long... configure: error: in `/home/ci/build':
configure: error: cannot compute sizeof (long long)
See `config.log' for more details
</code></pre>
<p>Quote from config.log:</p>
<pre><code>configure:13939: checking size of int
configure:13944: clang-15 -std=c99 -Werror=pedantic -pedantic-errors -o conftest -O1 -fno-fast-math -ggdb3 -fdeclspec -fstack-protector-strong conftest.c -lm >&5
conftest.c:107:25: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
static long int longval () { return (long int) (sizeof (int)); }
^
void
conftest.c:108:35: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
static unsigned long int ulongval () { return (long int) (sizeof (int)); }
^
void
2 errors generated.
</code></pre>
Ruby master - Bug #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 - 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 #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 #17358 (Closed): Backport 1ca9facab6c85264168b4c0a18c24f489cabcc9f
https://bugs.ruby-lang.org/issues/17358
2020-12-01T07:13:52Z
znz (Kazuhiro NISHIYAMA)
<p>monitor が C 実装になったときから rdoc が生成されなくなっていたようで、 <code>ext/.document</code> に追加する必要があったようです。</p>
<p>C 実装になったのが 2.7 からで、2.6 以前には影響しないようなので、2.7 へのバックポートをお願いします。</p>
Ruby master - Bug #17254 (Closed): ENV.replace may set nil instead of the proper value
https://bugs.ruby-lang.org/issues/17254
2020-10-08T10:20:52Z
znz (Kazuhiro NISHIYAMA)
<p>On docs.ruby-lang.org, it uses <a href="https://snapcraft.io/ruby" class="external">snap ruby</a>, and it failed to run <code>rdoc</code>.</p>
<pre><code>Oct 07 13:20:08 docs-2020.ruby-lang.org env[6183]: rdoc --title Documentation for Ruby master --main README.md --output /var/www/docs.ruby-lang.org/releases/20200916140300/master -U --all --encoding=UTF-8 .
Oct 07 13:20:08 docs-2020.ruby-lang.org env[6183]: <internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError)
Oct 07 13:20:08 docs-2020.ruby-lang.org env[6183]: from <internal:gem_prelude>:1:in `<internal:gem_prelude>'
Oct 07 13:20:08 docs-2020.ruby-lang.org env[6183]: rake aborted!
</code></pre>
<p>I investigate it, it caused by setting nil instead of the proper value in <code>ENV.replace</code>.</p>
<pre><code>vagrant@buster:/tmp/t$ cat Gemfile
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
# gem "rails"
vagrant@buster:/tmp/t$ env PATH=/var/www/docs.ruby-lang.org/shared/bundle/ruby/2.7.0/bin:/snap/bin:$PATH DEBIAN_DISABLE_RUBYGEMS_INTEGRATION=1 bundle exec env -u RUBYOPT ruby -r/snap/ruby/189/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/setup -e 'p ENV["RUBYLIB"]'
"/snap/ruby/189/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib"
</code></pre>
<p>Calling <code>ENV.clear</code> before <code>ENV.replace</code> resolves this issue.</p>
<pre><code>vagrant@buster:/tmp/t$ cat /tmp/clear-before-replace.rb
class << ENV
alias orig_replace replace
def replace(h)
clear
orig_replace(h)
end
end
vagrant@buster:/tmp/t$ env PATH=/var/www/docs.ruby-lang.org/shared/bundle/ruby/2.7.0/bin:/snap/bin:$PATH DEBIAN_DISABLE_RUBYGEMS_INTEGRATION=1 bundle exec env -u RUBYOPT ruby -r/tmp/clear-before-replace -r/snap/ruby/189/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/setup -e 'p ENV["RUBYLIB"]'
"/snap/ruby/189/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib:/snap/ruby/189/lib/ruby/2.7.0:/snap/ruby/189/lib/ruby/2.7.0/amd64"
</code></pre>
<p>Where should call <code>ENV.clear</code>?<br>
In <code>ENV.replace</code> or caller of <code>ENV.replace</code>?</p>
Ruby master - Bug #17217 (Closed): Backport request: GitHub Actions set-env → $GITHUB_ENV
https://bugs.ruby-lang.org/issues/17217
2020-10-06T02:48:08Z
znz (Kazuhiro NISHIYAMA)
<p>Please backport <a href="https://github.com/ruby/ruby/pull/3630" class="external">https://github.com/ruby/ruby/pull/3630</a></p>
<p><code>set-env</code> is deprecated, and it will be disabled in the future.</p>
<p><a href="https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/" class="external">https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/</a></p>
<blockquote>
<p>We are monitoring telemetry for the usage of these commands and plan to fully disable them in the future.</p>
</blockquote>
Ruby master - Bug #16639 (Closed): ARGF.each_line(chomp: true) cannot call without warning
https://bugs.ruby-lang.org/issues/16639
2020-02-18T02:30:46Z
znz (Kazuhiro NISHIYAMA)
<p><code>ARGF.each_line</code> with keyword arguments shows warnings on 2.7.0, and does not work on current master.</p>
<pre><code>$ ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin18]
$ ruby -e 'p ARGF.each_line(chomp: true).first' < /etc/hosts
-e:1: warning: Using the last argument as keyword parameters is deprecated
"##"
$ ruby -e 'p ARGF.each_line({chomp: true}).first' < /etc/hosts
-e:1: warning: Using the last argument as keyword parameters is deprecated
"##"
$ ruby -e 'p ARGF.each_line(**{chomp: true}).first' < /etc/hosts
-e:1: warning: Using the last argument as keyword parameters is deprecated
"##"
</code></pre>
<p><code>IO#each_line(chomp: true)</code> does not show warnings, and works on current master.</p>
<pre><code>ruby -e 'p ARGF.to_io.each_line(chomp: true).first' < /etc/hosts
"##"
</code></pre>
Ruby master - Misc #16630 (Assigned): Deprecate pub/ruby/*snapshot* and use pub/ruby/snapshot/* i...
https://bugs.ruby-lang.org/issues/16630
2020-02-13T08:51:43Z
znz (Kazuhiro NISHIYAMA)
<p>In <a href="https://www.ruby-lang.org/en/downloads/" class="external">https://www.ruby-lang.org/en/downloads/</a>, snapshots links to <code>pub/ruby/snapshot.*</code> and <code>pub/ruby/stable-snapshot.*</code> as official snapshot tarballs now.</p>
<p>I want to change links to snapshot tarballs in <a href="https://cache.ruby-lang.org/pub/ruby/snapshot/" class="external">https://cache.ruby-lang.org/pub/ruby/snapshot/</a>.</p>
<p>They created by <a href="https://github.com/ruby/actions/" class="external">https://github.com/ruby/actions/</a> now.</p>
<p>Tarballs under <code>pub/ruby/snapshot/</code> have branch name (e.g. <code>ruby_2_7</code>) in filenames.<br>
And they are tested. (but they remain even if tests failed.)</p>
<p><code>pub/ruby/*snapshot.*</code> are not tested.<br>
And there are fewer files under <code>pub/ruby/</code> without sub-directory recently. (e.g. <code>ruby- 2.7.*</code> are in <code>pub/ruby/2.7/</code> only.)<br>
So I want to remove them.</p>
<p>Because of the plan, <code>stable-snapshot.*</code> are still snapshot of <code>ruby_2_6</code> instead of <code>ruby_2_7</code>.</p>
Ruby master - 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 #16424 (Closed): abort without arguments does not print error info
https://bugs.ruby-lang.org/issues/16424
2019-12-15T06:17:06Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://docs.ruby-lang.org/ja/2.0.0/method/Kernel/m/abort.html" class="external">https://docs.ruby-lang.org/ja/2.0.0/method/Kernel/m/abort.html</a><br>
には「引数を省略した呼び出し時に $! が nil でなければその例外の メッセージを標準エラー出力 $stderr に出力」されるとありますが、 1.9 から出力されなくなっているようです。</p>
<pre><code>% docker run -it --rm rubylang/all-ruby env ALL_RUBY_SINCE=ruby-1.6 ./all-ruby -e 'begin;raise "foo";rescue;abort;end'
ruby-1.6.0 -e:1: foo (RuntimeError)
exit 1
...
ruby-1.8.7-p374 -e:1: foo (RuntimeError)
exit 1
ruby-1.9.0-0 exit 1
...
ruby-2.7.0-preview3 exit 1
</code></pre>
<p>笹田さんに直接確認してみたところ、バグということだったので、チケットとして登録しておきます。</p>
Ruby master - Feature #16419 (Closed): FrozenError.new ignores receiver:
https://bugs.ruby-lang.org/issues/16419
2019-12-14T07:29:44Z
znz (Kazuhiro NISHIYAMA)
<p>Other exception classes with receiver accept recevier as keyword argument of new.<br>
But FrozenError.new accept as positional argument.<br>
I think keyword argument is better consistency.</p>
<pre><code>% git grep 'receiver[:=]' ../error.c
../error.c: * FrozenError.new(msg=nil, receiver=nil) -> name_error
../error.c: * NameError.new(msg=nil, name=nil, receiver: nil) -> name_error
../error.c: * [1, 2, 3].method(:rject) # NameError with name "rject" and receiver: Array
../error.c: * [1, 2, 3].singleton_method(:rject) # NameError with name "rject" and receiver: [1, 2, 3]
../error.c: * NoMethodError.new(msg=nil, name=nil, args=nil, private=false, receiver: nil) -> no_method_error
../error.c: * KeyError.new(message=nil, receiver: nil, key: nil) -> key_error
</code></pre>
Ruby master - 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 - 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 #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 #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 - 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 - Bug #13905 (Rejected): files in gemspec
https://bugs.ruby-lang.org/issues/13905
2017-09-15T15:56:02Z
znz (Kazuhiro NISHIYAMA)
<p>ext/zlib/zlib.gemspec の files をみると ext/zlib/extconf.rb のような top_srcdir からの相対パスらしき指定と gemspec からの相対パスらしき(upstreamでのパス?) zlib.gemspec のようなものが混在しているように見えます。</p>
<p>top_srcdir からの相対パスが正しいのなら ext/zlib がついていないファイルを指しているのはおかしいし、 gemspec ファイルからの相対パスなら ext/zlib がついているのがおかしいと思いました。</p>
<p>他の gemspec ファイルは確認していないのですが、lib/scanf.gemspec をみると lib/scanf.rb だけなので、top_srcdir からの相対パスが正しくて、そもそも sync されていないファイルが入っていたり、gemspec ファイルが入っていること自体がおかしい気がします。</p>
Ruby master - Feature #13904 (Closed): getter for original information of Enumerator
https://bugs.ruby-lang.org/issues/13904
2017-09-15T15:27:58Z
znz (Kazuhiro NISHIYAMA)
<p>At <a href="https://gitter.im/red-data-tools/ja?at=59b0aaa097cedeb04828e268" class="external">https://gitter.im/red-data-tools/ja?at=59b0aaa097cedeb04828e268</a> ,<br>
mrkn says narray and pycall use internal information of ruby to check <code>Range#step(n)</code>.</p>
<p>People of red-data-tools/ja suggest subclass of Enumerator.<br>
But I think it does not match Ruby's '大クラス主義' (I don't know this word in English), so I suggest to add some methods to Enumerator class.</p>
<p>proof of concept attached.</p>
<p>Usage:</p>
<pre><code>% irb -r irb/completion --simple-prompt
>> e=(1..2).step(3)
=> #<Enumerator: 1..2:step(3)>
>> e.receiver
=> 1..2
>> e.method_name
=> :step
>> e.arguments
=> [3]
</code></pre>
<p><code>#method</code> is conflict with <code>Kernel#method</code>, so use <code>#method_name</code> instead.</p>
Ruby master - Bug #13538 (Closed): head: illegal option -- c
https://bugs.ruby-lang.org/issues/13538
2017-05-03T02:01:04Z
znz (Kazuhiro NISHIYAMA)
<p><a href="http://blog.n-z.jp/blog/2017-05-02-ruby-sample.html" class="external">Solaris 11.3でビルドを試した</a>ところ、configure の最後で以下のようなエラーが出ました。</p>
<pre><code>---
Configuration summary for ruby version 2.5.0
head: illegal option -- c
usage: head [-n #] [-#] [filename...]
/export/home/vagrant/opt/ruby
head: illegal option -- c
usage: head [-n #] [-#] [filename...]
${prefix}
head: illegal option -- c
(略)
head: illegal option -- c
usage: head [-n #] [-#] [filename...]
yes
head: illegal option -- c
usage: head [-n #] [-#] [filename...]
man
---
</code></pre>
<p>head -c は <a href="http://pubs.opengroup.org/onlinepubs/9699919799/utilities/head.html" class="external">POSIX</a> になくて、代わりの手段を探してみたところ、<a href="http://qiita.com/richmikan@github/items/bd4b21cf1fe503ab2e5c#head%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89" class="external">どの環境でも使えるシェルスクリプトを書くためのメモ ver4.51 - Qiita の headコマンド</a> にあったので <code>head -c26</code> を <code>dd bs=1 count=26 2>/dev/null</code> に書き換えます。</p>
Ruby master - Bug #13423 (Closed): error in etc.gemspec
https://bugs.ruby-lang.org/issues/13423
2017-04-11T14:11:11Z
znz (Kazuhiro NISHIYAMA)
<p><code>git</code> コマンドがないと <code>make install</code> が <code>etc.gemspec</code> でエラーになります。</p>
<pre><code>Invalid gemspec in [/path/to/ruby/ext/etc/etc.gemspec]: No such file or directory - git
from ../tool/rbinstall.rb:889:in `<main>'
from ../tool/rbinstall.rb:889:in `each'
from ../tool/rbinstall.rb:892:in `block in <main>'
from ../tool/rbinstall.rb:763:in `block in <main>'
from ../tool/rbinstall.rb:775:in `install_default_gem'
from ../tool/rbinstall.rb:775:in `map'
../tool/rbinstall.rb:776:in `block in install_default_gem': invalid spec in /path/to/ruby/ext/etc/etc.gemspec (RuntimeError)
</code></pre>
Ruby master - Bug #12942 (Third Party's Issue): about psych 2.2.0
https://bugs.ruby-lang.org/issues/12942
2016-11-15T15:14:20Z
znz (Kazuhiro NISHIYAMA)
<p>r56773 <a href="https://github.com/ruby/ruby/commit/4e70bae2bc9253fb91ae6c95bbe8e01e38d8d3df" class="external">https://github.com/ruby/ruby/commit/4e70bae2bc9253fb91ae6c95bbe8e01e38d8d3df</a> の ext/psych/psych.gemspec の差分には README.rdoc から README.md への変更が含まれていますが、 ext/psych 以下には README.rdoc も README.md もないようですが、良いのでしょうか?</p>
<p>typo 修正が戻ってしまっているっぽい変更も気になります。(occurrence - occurence, corresponding - correspoding, indentation - intendation, unknown - uknown)</p>
Ruby master - Bug #12815 (Closed): Integer#digits's error message different when base is Fixnum o...
https://bugs.ruby-lang.org/issues/12815
2016-10-06T12:33:05Z
znz (Kazuhiro NISHIYAMA)
<p>Is this intended?</p>
<pre><code>% ruby -ve '60.upto(65){|n| 1.digits(-(1<<n)) rescue p $! }'
ruby 2.4.0dev (2016-10-06 trunk 56364) [x86_64-linux]
#<ArgumentError: invalid radix -1152921504606846976>
#<ArgumentError: invalid radix -2305843009213693952>
#<ArgumentError: invalid radix -4611686018427387904>
#<ArgumentError: negative radix>
#<ArgumentError: negative radix>
#<ArgumentError: negative radix>
</code></pre>
Ruby master - Bug #12792 (Closed): cannot open https://bugs.jruby.org/4176
https://bugs.ruby-lang.org/issues/12792
2016-09-27T12:53:02Z
znz (Kazuhiro NISHIYAMA)
<p><a href="https://bugs.jruby.org/4176" class="external">https://bugs.jruby.org/4176</a> in r56260.<br>
But I cannot open it because connection refused.</p>
Ruby master - 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 #12487 (Closed): -12345.digits(7) behavior
https://bugs.ruby-lang.org/issues/12487
2016-06-14T15:19:50Z
znz (Kazuhiro NISHIYAMA)
<p>rdoc of Integer#digits says <code>-12345.digits(7) #=> [4, 6, 6, 0, 5]</code>, but it raises <code>Math::DomainError: out of domain</code>.<br>
Which is expected behavior?</p>
Ruby master - Bug #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 #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 #9773 (Closed): broken link in man/ruby.1
https://bugs.ruby-lang.org/issues/9773
2014-04-24T12:33:10Z
znz (Kazuhiro NISHIYAMA)
<p>Two broken link <code>https://github.com/languages/Ruby</code> exist in <code>./man/ruby.1</code>.<br>
I do not know what it was, and I can't replace newer URL.</p>
Ruby master - Bug #9268 (Closed): dead link to raa
https://bugs.ruby-lang.org/issues/9268
2013-12-20T23:48:09Z
znz (Kazuhiro NISHIYAMA)
<p>In lib/net/smtp.rb:</p>
<a name="-What-is-This-Library-NOT"></a>
<h1 >== What is This Library NOT?<a href="#-What-is-This-Library-NOT" class="wiki-anchor">¶</a></h1>
<h1></h1>
<a name="This-library-does-NOT-provide-functions-to-compose-internet-mails"></a>
<h1 >This library does NOT provide functions to compose internet mails.<a href="#This-library-does-NOT-provide-functions-to-compose-internet-mails" class="wiki-anchor">¶</a></h1>
<a name="You-must-create-them-by-yourself-If-you-want-better-mail-support"></a>
<h1 >You must create them by yourself. If you want better mail support,<a href="#You-must-create-them-by-yourself-If-you-want-better-mail-support" class="wiki-anchor">¶</a></h1>
<a name="try-RubyMail-or-TMail-You-can-get-both-libraries-from-RAA"></a>
<h1 >try RubyMail or TMail. You can get both libraries from RAA.<a href="#try-RubyMail-or-TMail-You-can-get-both-libraries-from-RAA" class="wiki-anchor">¶</a></h1>
<a name="httpwwwruby-langorgenraahtml"></a>
<h1 >(<a href="http://www.ruby-lang.org/en/raa.html" class="external">http://www.ruby-lang.org/en/raa.html</a>)<a href="#httpwwwruby-langorgenraahtml" class="wiki-anchor">¶</a></h1>
<p>and example in lib/open-uri.rb:</p>
<a name="openhttpwwwruby-langorgenraahtml-proxy-gt-nil-f"></a>
<h1 >open("<a href="http://www.ruby-lang.org/en/raa.html" class="external">http://www.ruby-lang.org/en/raa.html</a>", :proxy => nil) {|f|<a href="#openhttpwwwruby-langorgenraahtml-proxy-gt-nil-f" class="wiki-anchor">¶</a></h1>
<a name="-"></a>
<h1 ># ...<a href="#-" class="wiki-anchor">¶</a></h1>
<a name=""></a>
<h1 >}<a href="#" class="wiki-anchor">¶</a></h1>
Ruby master - Bug #9266 (Closed): dead links to rubyforge
https://bugs.ruby-lang.org/issues/9266
2013-12-20T23:41:42Z
znz (Kazuhiro NISHIYAMA)
<p>For example,<br>
<a href="http://rake.rubyforge.org/doc/release_notes/rake-10_1_0_rdoc.html" class="external">http://rake.rubyforge.org/doc/release_notes/rake-10_1_0_rdoc.html</a><br>
<a href="http://rake.rubyforge.org/doc/release_notes/rake-10_0_3_rdoc.html" class="external">http://rake.rubyforge.org/doc/release_notes/rake-10_0_3_rdoc.html</a><br>
are in NEWS, but they can not open.</p>
Ruby master - Bug #9029 (Closed): doc of ARGF.gets
https://bugs.ruby-lang.org/issues/9029
2013-10-17T14:54:27Z
znz (Kazuhiro NISHIYAMA)
<p>rdoc of ARGF.gets says ARGF.gets return string only, but it may return nil.</p>
<p>doc of rb_f_gets:</p>
<ul>
<li>call-seq:</li>
<li>
<pre><code>gets(sep=$/) -> string or nil
</code></pre>
</li>
<li>
<pre><code>gets(limit) -> string or nil
</code></pre>
</li>
<li>
<pre><code>gets(sep,limit) -> string or nil
</code></pre>
</li>
</ul>
<p>doc of argf_gets:</p>
<ul>
<li>call-seq:</li>
<li>
<pre><code>ARGF.gets(sep=$/) -> string
</code></pre>
</li>
<li>
<pre><code>ARGF.gets(limit) -> string
</code></pre>
</li>
<li>
<pre><code>ARGF.gets(sep, limit) -> string
</code></pre>
</li>
</ul>
Ruby master - Bug #8819 (Closed): ChangeLog includes non us-ascii character
https://bugs.ruby-lang.org/issues/8819
2013-08-26T10:13:43Z
znz (Kazuhiro NISHIYAMA)
<p>ChangeLog should be us-ascii because local variables for emacs set "coding: us-ascii".</p>
<p>% ruby -e 'ARGF.each_line{|line|p line.b unless line.force_encoding("us-ascii").valid_encoding?}' ChangeLog<br>
"\t Patches by David Rodr\xC3\xADguez <a href="/issues/8802">[ruby-core:56734]</a> [Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Minor improvements in socket extension docs (Closed)" href="https://bugs.ruby-lang.org/issues/8802">#8802</a>]\n"</p>
Ruby master - Bug #8712 (Closed): Couldn't find file to include 'sample/curses/*.rb'
https://bugs.ruby-lang.org/issues/8712
2013-07-31T23:17:38Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
When builddir is not srcdir, failed to include from curses.c.</p>
<p>Generating RDoc documentation<br>
Parsing sources...<br>
Couldn't find file to include 'sample/curses/hello.rb' from .../ruby/ext/curses/curses.c<br>
Couldn't find file to include 'sample/curses/rain.rb' from .../ruby/ext/curses/curses.c<br>
Couldn't find file to include 'sample/curses/mouse.rb' from .../ruby/ext/curses/curses.c<br>
=end</p>
Ruby master - Bug #8518 (Closed): assertion failed in rb_ary_sort_bang
https://bugs.ruby-lang.org/issues/8518
2013-06-12T12:58:24Z
znz (Kazuhiro NISHIYAMA)
<p>-DARRAY_DEBUG の続きです。</p>
<p>test/ruby/test_array.rb の test_sort! の以下に相当する部分で assertion failed になります。</p>
<p>% ./miniruby -e 'a=Array[4, 1, 2, 3]; a.sort! {|m, n| a.replace([9, 8, 7]); m <=> n }'<br>
miniruby: .../ruby/array.c:2336: rb_ary_sort_bang: Assertion `!(((!((!(((VALUE)((ary)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((ary)) & ~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((ary)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)(((ary))))->flags&(((((VALUE)1)<<(12+2))))):0) || !((!(((VALUE)((ary)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((ary)) & ~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((ary)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)(((ary))))->flags&(((((VALUE)1)<<(12+1))))):0)) ? (void) (0) : __assert_fail ("!((!(((VALUE)((ary)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((ary)) & ~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((ary)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)(((ary))))->flags&(((((VALUE)1)<<(12+2))))):0) || !((!(((VALUE)((ary)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((ary)) & ~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((ary)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)(((ary))))->flags&(((((VALUE)1)<<(12+1))))):0)", "/home/kazu/z/wc/CI/ruby/array.c", 2336, <strong>PRETTY_FUNCTION</strong>)), ((!(((VALUE)((ary)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((ary)) & ~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((ary)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)(((ary))))->flags&(((((VALUE)1)<<(12+1))))):0)!=0)' failed.</p>
<p>なぜか行番号がずれていて 2336 行目は以下の if 文の行ですが、その下の ary の方がひっかかっているようです。</p>
<pre><code> assert(!ARY_EMBED_P(tmp));
if (ARY_HEAP_PTR(ary) == ARY_HEAP_PTR(tmp)) {
assert(!ARY_EMBED_P(ary));
</code></pre>
Backport193 - Backport #8513 (Rejected): assertion failed in rb_ary_modify
https://bugs.ruby-lang.org/issues/8513
2013-06-11T18:38:52Z
znz (Kazuhiro NISHIYAMA)
<p>-DARRAY_DEBUG をつけていると rdoc の生成中に array.c:282 で assertion failed になります。</p>
<pre><code> else if (ARY_SHARED_NUM(shared) == 1 && len > (RARRAY_LEN(shared)>>1)) {
long shift = RARRAY_PTR(ary) - RARRAY_PTR(shared);
ARY_SET_PTR(ary, RARRAY_PTR(shared));
ARY_SET_CAPA(ary, RARRAY_LEN(shared));
</code></pre>
<p>の ARY_SET_CAPA が assertion failed になっている 282 行目で、ARY_SET_PTR は通っているので、共通している<br>
assert(!ARY_EMBED_P(ary));<br>
assert(!OBJ_FROZEN(ary));<br>
は問題なくて<br>
assert(!ARY_SHARED_P(ary));<br>
でひっかかっているようです。</p>
Ruby master - Bug #8510 (Closed): assertion failed in ary_resize_capa
https://bugs.ruby-lang.org/issues/8510
2013-06-11T09:47:22Z
znz (Kazuhiro NISHIYAMA)
<p>-DARRAY_DEBUG を付けていると enc.mk のあたりで make が通りません。</p>
<p>generating enc.mk<br>
miniruby: .../ruby/array.c:153: ary_resize_capa: Assertion `!(!!((!(((VALUE)(ary) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(ary) & ~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(ary))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)(ary))->flags&((((VALUE)1)<<11))):((((int)(long)(ary))&RUBY_FIXNUM_FLAG)||((((int)(long)(ary))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG))))' failed.<br>
Aborted (core dumped)</p>
<p>原因を調べてみたところ、 ary_make_shared で</p>
<pre><code>else if (OBJ_FROZEN(ary)) {
ary_resize_capa(ary, ARY_HEAP_LEN(ary));
</code></pre>
<p>という条件で ary_resize_capa を呼び出しているのに、ary_resize_capa の中に</p>
<pre><code>assert(!OBJ_FROZEN(ary));
</code></pre>
<p>があるからのようです。</p>
Backport200 - Backport #8183 (Closed): CGI.unescapeHTML does not decode あ
https://bugs.ruby-lang.org/issues/8183
2013-03-29T14:12:41Z
znz (Kazuhiro NISHIYAMA)
<p>数値文字参照で あ のように X が大文字の時に CGI.unescapeHTML で "あ" に戻りません。</p>
<p><a href="http://www.w3.org/TR/html5/syntax.html#character-references" class="external">http://www.w3.org/TR/html5/syntax.html#character-references</a><br>
の Hexadecimal numeric character reference によると</p>
<blockquote>
<p>which must be followed by either a "x" (U+0078) character or a "X" (U+0058) character,</p>
</blockquote>
<p>となっているので、大文字でも受け付けてほしいです。</p>
Ruby master - Bug #8084 (Closed): ext/tk/MANUAL_tcltklib.eucj is utf-8
https://bugs.ruby-lang.org/issues/8084
2013-03-14T00:19:20Z
znz (Kazuhiro NISHIYAMA)
<p>ext/tk/MANUAL_tcltklib.eucj は中身が UTF-8 に変更されているので、ファイル名も変更した方が良いのではないでしょうか?</p>
Ruby master - Bug #8010 (Closed): Enumerator#with_index(large_number)
https://bugs.ruby-lang.org/issues/8010
2013-03-04T20:18:03Z
znz (Kazuhiro NISHIYAMA)
<p>Enumerator#with_index の引数で大きな数を指定するとマイナスになったり例外になったりするのはバグでしょうか?</p>
<p>% ruby -ve 'p 3.times.with_index(1<<61).to_a'<br>
ruby 2.1.0dev (2013-03-04 trunk 39580) [x86_64-linux]<br>
[[0, 2305843009213693952], [1, 2305843009213693953], [2, 2305843009213693954]]<br>
% ruby -ve 'p 3.times.with_index(1<<62).to_a'<br>
ruby 2.1.0dev (2013-03-04 trunk 39580) [x86_64-linux]<br>
[[0, -4611686018427387904], [1, -4611686018427387903], [2, -4611686018427387902]]<br>
% ruby -ve 'p 3.times.with_index(1<<63).to_a'<br>
ruby 2.1.0dev (2013-03-04 trunk 39580) [x86_64-linux]<br>
-e:1:in <code>with_index': bignum too big to convert into </code>long' (RangeError)<br>
from -e:1:in <code>each' from -e:1:in </code>to_a'<br>
from -e:1:in `'</p>
Ruby master - Bug #7244 (Closed): ArgumentError of refine
https://bugs.ruby-lang.org/issues/7244
2012-10-30T22:02:31Z
znz (Kazuhiro NISHIYAMA)
<p>refine は 1 個しか引数をとらないはずなのにブロックを渡さずに引数 1 個で呼び出すと (0 for 1..3) という ArgumentError になります。</p>
<p>% ruby -v<br>
ruby 2.0.0dev (2012-10-30 trunk 37389) [x86_64-linux]<br>
% ruby -e 'Class.new{|c|refine}'<br>
-e:1:in <code>refine': wrong number of arguments (0 for 1) (ArgumentError) from -e:1:in </code>block in '<br>
from -e:1:in <code>initialize' from -e:1:in </code>new'<br>
from -e:1:in <code><main>' % ruby -e 'Class.new{|c|refine c}' -e:1:in </code>refine': wrong number of arguments (0 for 1..3) (ArgumentError)<br>
from -e:1:in <code>block in <main>' from -e:1:in </code>initialize'<br>
from -e:1:in <code>new' from -e:1:in </code>'<br>
%</p>
Ruby master - Bug #7197 (Closed): Error: test_tls_v1_2(OpenSSL::TestSSL)
https://bugs.ruby-lang.org/issues/7197
2012-10-20T13:30:51Z
znz (Kazuhiro NISHIYAMA)
<p>Ubuntu 12.04.1 LTS 64-bit の環境で以下のエラーが出ています。</p>
<ol start="2">
<li>Error:<br>
test_tls_v1_2(OpenSSL::TestSSL):<br>
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=unknown state: tlsv1 alert protocol version<br>
.../test/openssl/test_ssl.rb:607:in <code>connect' .../test/openssl/test_ssl.rb:607:in </code>server_connect'<br>
.../test/openssl/test_ssl.rb:468:in <code>block in test_tls_v1_2' .../test/openssl/utils.rb:293:in </code>call'<br>
.../test/openssl/utils.rb:293:in <code>start_server' .../test/openssl/test_ssl.rb:593:in </code>start_server_version'<br>
.../test/openssl/test_ssl.rb:467:in `test_tls_v1_2'</li>
</ol>
<p>OpenSSL のバージョンは以下の通りです。</p>
<p>% openssl version<br>
OpenSSL 1.0.1 14 Mar 2012<br>
% dpkg -l openssl | grep '^ii'<br>
ii openssl 1.0.1-4ubuntu5.5 Secure Socket Layer (SSL) binary and related cryptographic tools<br>
%</p>
Ruby master - Bug #6160 (Closed): '\\'.delete('\\') raise ArgumentError: empty string
https://bugs.ruby-lang.org/issues/6160
2012-03-17T01:40:37Z
znz (Kazuhiro NISHIYAMA)
<p>r35069 の変更の影響でクリーンビルドすると<br>
../tool/transcode-tblgen.rb:758:in `delete': empty string (ArgumentError)<br>
で止まります。</p>
<p>再現条件を絞り込んだところ '\'.delete('\') で ArgumentError になりました。</p>
Ruby master - Bug #5879 (Closed): $ignore_error use before set
https://bugs.ruby-lang.org/issues/5879
2012-01-12T01:19:29Z
znz (Kazuhiro NISHIYAMA)
<p>lib/mkmf.rb で make_makefile の中で<br>
$ignore_error = $nmake ? '' : ' 2> /dev/null || true'<br>
と $ignore_error が設定されていますが、 make_makefile の呼び出しよりも前の<br>
CLEANINGS への代入で $ignore_error が使われていて、<br>
DISTCLEANDIRS の RMDIRS に ' 2> /dev/null || true' が付きません。</p>
<p>この影響で make realclean などで Linux だと「rmdir: オペランドがありません」、<br>
Mac OS X だと「usage: rmdir [-p] directory ...」というメッセージが出ます。</p>
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 #4863 (Third Party's Issue): config.charset not found
https://bugs.ruby-lang.org/issues/4863
2011-06-10T16:15:33Z
znz (Kazuhiro NISHIYAMA)
<p>ext/iconv/charset_alias.rb と ext/iconv/mkwrapper.rb に<br>
<a href="http://www.ctan.org/get/macros/texinfo/texinfo/gnulib/lib/config.charset" class="external">http://www.ctan.org/get/macros/texinfo/texinfo/gnulib/lib/config.charset</a><br>
という URL が書いてありますが、存在しなくなっているようです。</p>
Ruby master - Bug #4241 (Closed): IMAPTest#test_imaps_verify_none does not stop
https://bugs.ruby-lang.org/issues/4241
2011-01-06T20:09:52Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
IMAPTest#test_imaps_verify_none hangs up and can not stop with SIGINT.<br>
I guess problem exists in ossl_ssl_shutdown, and running test does not stop with reverting r30451 .</p>
<p>% ruby-trunk test/net/imap/test_imap.rb -v -n test_imaps_verify_none<br>
Run options: -v -n test_imaps_verify_none</p>
<a name="Running-tests"></a>
<h1 >Running tests:<a href="#Running-tests" class="wiki-anchor">¶</a></h1>
<p>IMAPTest#test_imaps_verify_none =<br>
=end</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 #3934 (Rejected): ChangeLog-1.9.3
https://bugs.ruby-lang.org/issues/3934
2010-10-12T18:58:14Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
<a class="issue tracker-4 status-5 priority-4 priority-default closed" title="Backport: lib/un.rb (httpd): SIGQUIT and SIGHUP are not guaranteed to exist. (Closed)" href="https://bugs.ruby-lang.org/issues/3932">#3932</a> を調べていて気づいたのですが、trunk/ChangeLog の末尾に</p>
<blockquote>
<p>For the changes before 1.9.3, see doc/ChangeLog-1.9.3</p>
</blockquote>
<p>と書いてありますが、 1.9.2(-p0) に入っていない変更も doc/ChangeLog-1.9.3 に移動しているのは意図的でしょうか?<br>
=end</p>
Backport192 - Backport #3468 (Closed): .cvsignore
https://bugs.ruby-lang.org/issues/3468
2010-06-23T17:24:53Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
.cvsignore はもう消してしまっていいのではないでしょうか。</p>
<p>% ls trunk/**/.cvsignore<br>
trunk/.cvsignore trunk/ext/nkf/.cvsignore<br>
trunk/ext/.cvsignore trunk/ext/openssl/.cvsignore<br>
trunk/ext/bigdecimal/.cvsignore trunk/ext/pty/.cvsignore<br>
trunk/ext/curses/.cvsignore trunk/ext/racc/cparse/.cvsignore<br>
trunk/ext/dbm/.cvsignore trunk/ext/readline/.cvsignore<br>
trunk/ext/digest/.cvsignore trunk/ext/ripper/.cvsignore<br>
trunk/ext/digest/bubblebabble/.cvsignore trunk/ext/sdbm/.cvsignore<br>
trunk/ext/digest/md5/.cvsignore trunk/ext/socket/.cvsignore<br>
trunk/ext/digest/rmd160/.cvsignore trunk/ext/stringio/.cvsignore<br>
trunk/ext/digest/sha1/.cvsignore trunk/ext/strscan/.cvsignore<br>
trunk/ext/digest/sha2/.cvsignore trunk/ext/syck/.cvsignore<br>
trunk/ext/dl/.cvsignore trunk/ext/syslog/.cvsignore<br>
trunk/ext/etc/.cvsignore trunk/ext/tk/.cvsignore<br>
trunk/ext/fcntl/.cvsignore trunk/ext/tk/tkutil/.cvsignore<br>
trunk/ext/gdbm/.cvsignore trunk/ext/win32ole/.cvsignore<br>
trunk/ext/iconv/.cvsignore trunk/ext/zlib/.cvsignore<br>
trunk/ext/io/wait/.cvsignore<br>
%<br>
=end</p>
Backport187 - Backport #3425 (Closed): Error: test_filehandler(WEBrick::TestFileHandler)
https://bugs.ruby-lang.org/issues/3425
2010-06-11T10:18:24Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
test_filehandler(WEBrick::TestFileHandler) の Error が手元の環境でも chkbuild でも発生しています。</p>
<p><a href="http://www.rubyist.net/~akr/chkbuild/debian/ruby-1.8.7/log/20100611T085812.log.txt.gz" class="external">http://www.rubyist.net/~akr/chkbuild/debian/ruby-1.8.7/log/20100611T085812.log.txt.gz</a></p>
<ol start="3">
<li>Error:<br>
test_filehandler(WEBrick::TestFileHandler):<br>
NameError: undefined local variable or method <code>log' for #<WEBrick::TestFileHandler:0xb74a5058> ./test/webrick/test_filehandler.rb:96:in </code>test_filehandler'<br>
/home/akr/chkbuild/tmp/build/ruby-1.8.7/20100611T085812/ruby/lib/net/http.rb:1054:in <code>request' /home/akr/chkbuild/tmp/build/ruby-1.8.7/20100611T085812/ruby/lib/net/http.rb:2144:in </code>reading_body'<br>
/home/akr/chkbuild/tmp/build/ruby-1.8.7/20100611T085812/ruby/lib/net/http.rb:1053:in <code>request' /home/akr/chkbuild/tmp/build/ruby-1.8.7/20100611T085812/ruby/lib/net/http.rb:1037:in </code>request'<br>
/home/akr/chkbuild/tmp/build/ruby-1.8.7/20100611T085812/ruby/lib/net/http.rb:543:in <code>start' /home/akr/chkbuild/tmp/build/ruby-1.8.7/20100611T085812/ruby/lib/net/http.rb:1035:in </code>request'<br>
./test/webrick/test_filehandler.rb:95:in <code>test_filehandler' ./test/webrick/utils.rb:38:in </code>call'<br>
./test/webrick/utils.rb:38:in <code>start_server' ./test/webrick/utils.rb:46:in </code>start_httpserver'<br>
./test/webrick/test_filehandler.rb:79:in `test_filehandler'<br>
=end</li>
</ol>
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 #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 #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>
Backport191 - Backport #1976 (Closed): Errors in test/fileutils/test_fileutils.rb
https://bugs.ruby-lang.org/issues/1976
2009-08-21T22:13:09Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
環境によっては test_fileutils.rb でエラーになることがあるようです。</p>
<ol start="5">
<li>
<p>Error:<br>
test_rm_f(TestFileUtils):<br>
TypeError: can't convert Array into String<br>
/home/kazu/wc/ruby/trunk/test/fileutils/test_fileutils.rb:420:in `test_rm_f'</p>
</li>
<li>
<p>Error:<br>
test_rm_f(TestFileUtilsNoWrite):<br>
TypeError: can't convert Hash into String<br>
/home/kazu/wc/ruby/trunk/test/fileutils/test_nowrite.rb:78:in `test_rm_f'</p>
</li>
<li>
<p>Error:<br>
test_rm_rf(TestFileUtilsNoWrite):<br>
TypeError: can't convert Hash into String<br>
/home/kazu/wc/ruby/trunk/test/fileutils/test_nowrite.rb:84:in `test_rm_rf'</p>
</li>
</ol>
<p>状況を調べてみると FileUtils::NoWrite の rm_rf の super で mkmf.rb の rm_rf が呼ばれていました。</p>
<p>そのときの self.class.ancestors は<br>
[TestFileUtilsNoWrite, FileUtils::NoWrite, Test::Unit::TestCase, Test::Unit::Ass<br>
ertions, MiniTest::Unit::TestCase, MiniTest::Assertions, Object, JSON::Ext::Gene<br>
rator::GeneratorMethods::Object, RakeFileUtils, FileUtils, FileUtils::StreamUtil<br>
s_, PP::ObjectMixin, Kernel, BasicObject]<br>
となっていて、 FileUtils::NoWrite と FileUtils の間に Object が入っている (ここに mkmf.rb で rm_rf が定義されている) のが原因のようです。</p>
<p>以下のようにすると再現できます。</p>
<p>% ruby-trunk -r mkmf -r fileutils -e '<br>
include FileUtils<br>
class C<br>
include FileUtils::NoWrite<br>
def hoge<br>
p self.class.ancestors<br>
rm_rf("hoge")<br>
end<br>
end<br>
C.new.hoge'<br>
[C, FileUtils::NoWrite, Object, FileUtils, FileUtils::StreamUtils_, Kernel, BasicObject]<br>
/home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/mkmf.rb:201:in <code>[]': can't convert Hash into String (TypeError) from /home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/mkmf.rb:201:in </code>rm_rf'<br>
from /home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/fileutils.rb:1556:in <code>rm_rf' from -e:7:in </code>hoge'<br>
from -e:10:in `'<br>
%<br>
=end</p>
Ruby 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 #1423 (Closed): config.charset not found
https://bugs.ruby-lang.org/issues/1423
2009-04-30T12:21:22Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
ext/iconv/charset_alias.rb に書いてある</p>
<a name="httpwwwctanorgtex-archivemacrostexinfotexinfointlconfigcharset"></a>
<h1 ><a href="http://www.ctan.org/tex-archive/macros/texinfo/texinfo/intl/config.charset" class="external">http://www.ctan.org/tex-archive/macros/texinfo/texinfo/intl/config.charset</a><a href="#httpwwwctanorgtex-archivemacrostexinfotexinfointlconfigcharset" class="wiki-anchor">¶</a></h1>
<a name="Fri-30-May-2003-000900-GMT"></a>
<h1 >Fri, 30 May 2003 00:09:00 GMT'<a href="#Fri-30-May-2003-000900-GMT" class="wiki-anchor">¶</a></h1>
<p>が存在しません。</p>
<p>CTAN: 402: HTTP NOT FOUND のページに書いてある<br>
<a href="http://www.ctan.org/search.html" class="external">http://www.ctan.org/search.html</a><br>
から探したところ、<br>
<a href="http://www.ctan.org/get/macros/texinfo/contrib/texinfo-hu/texinfo/intl/config.charset" class="external">http://www.ctan.org/get/macros/texinfo/contrib/texinfo-hu/texinfo/intl/config.charset</a><br>
<a href="http://www.ctan.org/get/macros/texinfo/texinfo/gnulib/lib/config.charset" class="external">http://www.ctan.org/get/macros/texinfo/texinfo/gnulib/lib/config.charset</a><br>
の2つが見つかりますが、後者のgnulibの方が新しいようです。<br>
=end</p>
Ruby master - Bug #1300 (Closed): Failure: test_open(TestSyslog)
https://bugs.ruby-lang.org/issues/1300
2009-03-18T16:37:18Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
<a href="http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/last" class="external">http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/last</a><br>
6) Failure:<br>
test_open(TestSyslog) [/home/akr/chkbuild/tmp/build/ruby-trunk/20090318T130900/ruby/test/test_syslog.rb:69]:<br>
<<#Syslog: opened=false>> expected but was<br>
.<br>
=end</p>
Ruby master - Bug #1096 (Closed): Failure: test_build_extensions_extconf_bad(TestGemInstaller)
https://bugs.ruby-lang.org/issues/1096
2009-02-03T16:23:25Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
<a href="http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/last" class="external">http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/last</a></p>
<ol>
<li>Failure:<br>
test_build_extensions_extconf_bad(TestGemInstaller) [/home/akr/chkbuild/tmp/build/ruby-trunk/20090203T103700/ruby/test/rubygems/test_gem_installer.rb:75]:<br>
Expected //home/akr/chkbuild/tmp/build/ruby-trunk/20090203T103700/ruby/ruby: No such file/ to match "/home/akr/chkbuild/tmp/build/ruby-trunk/20090203T103700/ruby/ruby extconf.rb\n/home/akr/chkbuild/tmp/build/ruby-trunk/20090203T103700/ruby/ruby:0: No such file or directory -- extconf.rb (LoadError)\n".</li>
</ol>
<p>I can reproduce other environments.<br>
=end</p>
Ruby master - Bug #1087 (Closed): Failure: test_ipv6_address_predicates(TestSocketAddrInfo)
https://bugs.ruby-lang.org/issues/1087
2009-02-02T11:52:41Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
configureで--with-lookup-order-hack=INETをつけていると<br>
AddrInfo.ip("::ffff:0.0.0.0").ipv6_v4mapped?<br>
がfalseになるようです。</p>
<p>% ruby-trunk -v test/socket/test_addrinfo.rb<br>
ruby 1.9.1p5000 (2009-02-02 trunk 21938) [i686-linux]<br>
Loaded suite test/socket/test_addrinfo<br>
Started<br>
...................F.............<br>
Finished in 0.012232 seconds.</p>
<ol>
<li>Failure:<br>
test_ipv6_address_predicates(TestSocketAddrInfo) [test/socket/test_addrinfo.rb:367]:<br>
AddrInfo.ip("::ffff:0.0.0.0").ipv6_v4mapped?</li>
</ol>
<p>33 tests, 165 assertions, 1 failures, 0 errors, 0 skips<br>
% ruby-trunk -v -r socket -e 'p AddrInfo.ip("::ffff:0.0.0.0").ipv6_v4mapped?'<br>
ruby 1.9.1p5000 (2009-02-02 trunk 21938) [i686-linux]<br>
false<br>
%<br>
=end</p>
Ruby 1.8 - Bug #1062 (Closed): Error: test_def_method
https://bugs.ruby-lang.org/issues/1062
2009-01-27T19:48:18Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
test_def_method(TestERBCore)とtest_def_method(TestERBCoreWOStrScan)でErrorがでています。</p>
<p><a href="http://www.rubyist.net/~akr/chkbuild/debian/ruby-1.8/last" class="external">http://www.rubyist.net/~akr/chkbuild/debian/ruby-1.8/last</a></p>
<ol>
<li>
<p>Error:<br>
test_def_method(TestERBCore):<br>
ArgumentError: wrong number of arguments (3 for 2)<br>
/home/akr/chkbuild/tmp/build/ruby-1.8/20090127T101411/ruby/test/erb/test_erb.rb:240:in <code>def_erb_method' /home/akr/chkbuild/tmp/build/ruby-1.8/20090127T101411/ruby/test/erb/test_erb.rb:240:in </code>test_def_method'<br>
/home/akr/chkbuild/tmp/build/ruby-1.8/20090127T101411/ruby/test/erb/test_erb.rb:239:in <code>module_eval' /home/akr/chkbuild/tmp/build/ruby-1.8/20090127T101411/ruby/test/erb/test_erb.rb:239:in </code>test_def_method'</p>
</li>
<li>
<p>Error:<br>
test_def_method(TestERBCoreWOStrScan):<br>
ArgumentError: wrong number of arguments (3 for 2)<br>
/home/akr/chkbuild/tmp/build/ruby-1.8/20090127T101411/ruby/test/erb/test_erb.rb:240:in <code>def_erb_method' /home/akr/chkbuild/tmp/build/ruby-1.8/20090127T101411/ruby/test/erb/test_erb.rb:240:in </code>test_def_method'<br>
/home/akr/chkbuild/tmp/build/ruby-1.8/20090127T101411/ruby/test/erb/test_erb.rb:239:in <code>module_eval' /home/akr/chkbuild/tmp/build/ruby-1.8/20090127T101411/ruby/test/erb/test_erb.rb:239:in </code>test_def_method'<br>
=end</p>
</li>
</ol>
Ruby master - Bug #1059 (Closed): cannot make socket.so
https://bugs.ruby-lang.org/issues/1059
2009-01-27T13:41:30Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
libsocks4を入れていて、ビルド時に環境変数にSOCKS_SERVER=localhostのように設定していると<br>
SOCKSSocketが出来るようなので、とりあえず設定していたのですが、そのような環境で<br>
コンパイルが通らなくなっているようです。</p>
<p>compiling socket<br>
make[1]: Entering directory <code>/home/kazu/build/ruby/trunk/ruby/ext/socket' ccache gcc -I. -I../../.ext/include/i686-linux -I/home/kazu/wc/ruby/trunk/include -I/home/kazu/wc/ruby/trunk/ext/socket -DRUBY_EXTCONF_H=\"extconf.h\" -D_FILE_OFFSET_BITS=64 -fPIC -DRUBY_DEBUG_ENV -O2 -g -Wall -Wformat=2 -Wundef -Wno-parentheses -fPIC -o init.o -c /home/kazu/wc/ruby/trunk/ext/socket/init.c /home/kazu/wc/ruby/trunk/ext/socket/init.c: In function 'ruby_connect': /home/kazu/wc/ruby/trunk/ext/socket/init.c:352: error: 'socks_connect_blocking' undeclared (first use in this function) /home/kazu/wc/ruby/trunk/ext/socket/init.c:352: error: (Each undeclared identifier is reported only once /home/kazu/wc/ruby/trunk/ext/socket/init.c:352: error: for each function it appears in.) make[1]: *** [init.o] Error 1 make[1]: Leaving directory </code>/home/kazu/build/ruby/trunk/ruby/ext/socket'<br>
make: *** [exts] Error 1<br>
=end</p>
Ruby master - Feature #1027 (Closed): Dir.home
https://bugs.ruby-lang.org/issues/1027
2009-01-20T18:01:33Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
I request Dir.home again.</p>
<a name="previous-request-was-ruby-dev31957"></a>
<h1 >previous request was <a href="https://blade.ruby-lang.org/ruby-dev/31957">[ruby-dev:31957]</a><a href="#previous-request-was-ruby-dev31957" class="wiki-anchor">¶</a></h1>
<p>Portable way of getting home directory is complex see <a href="https://blade.ruby-lang.org/ruby-core/12347">[ruby-core:12347]</a>.<br>
I think a simplest getting home directory is<br>
Dir.chdir { Dir.pwd }<br>
now.<br>
But this is not thread-safe and changes directory needlessness.<br>
=end</p>
Ruby 1.8 - Bug #989 (Rejected): [1.8.6] Crash during build on Mac OS 10.5.3/PPC when configured w...
https://bugs.ruby-lang.org/issues/989
2009-01-07T19:32:07Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
<a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Crash during build on Mac OS 10.5.3/PPC when configured with --enable-pthread (Closed)" href="https://bugs.ruby-lang.org/issues/193">#193</a> <a href="/issues/193">[ruby-core:17333]</a> の件が以前確認したときは ruby_1_8_7 だけだった気がしたのですが、<br>
ruby_1_8 と ruby_1_8_6 でも起きていたので、ruby_1_8 には ruby_1_8_7 と同じ修正を入れました。</p>
<p>ruby_1_8_6 には<br>
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE"<br>
AC_TRY_CPP([#include <AvailabilityMacros.h><br>
#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040<br>
#error pre OS X 10.4<br>
[!<===== pre OS X 10.4 =====>]<br>
#endif<br>
],<br>
[<br>
test "x$target_cpu" = xpowerpc && ac_cv_header_ucontext_h=no<br>
],<br>
[<br>
AC_DEFINE(BROKEN_SETREUID, 1)<br>
AC_DEFINE(BROKEN_SETREGID, 1)<br>
])<br>
の部分自体がなかったので、まだ修正できていません。<br>
=end</p>
Ruby master - Bug #972 (Closed): cannot make with GNU make
https://bugs.ruby-lang.org/issues/972
2009-01-03T17:05:20Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
r21280 の影響でinsns.incなどがmakeできなくなっています。</p>
<p><a href="http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20090103T035502.log.txt.gz" class="external">http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20090103T035502.log.txt.gz</a><br>
gcc -DRUBY_DEBUG_ENV -O2 -g -Wall -Wformat=2 -Wundef -Wno-parentheses -I. -I.ext/include/i686-linux -I./include -I. -DRUBY_EXPORT -o compile.o -c compile.c<br>
compile.c:17:21: error: insns.inc: No such file or directory<br>
compile.c:18:26: error: insns_info.inc: No such file or directory<br>
compile.c:48: error: field 'insn_id' has incomplete type<br>
compile.c:299:23: error: optinsn.inc: No such file or directory<br>
=end</p>
Ruby master - Bug #917 (Closed): cannot make with bison-2.4.1 (cont.)
https://bugs.ruby-lang.org/issues/917
2008-12-22T23:37:32Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
tUPLUSなどがenumのみで#defineされていないため、<br>
「#elif tUPLUS != 321」に引っかかって<br>
「error: #error tUPLUS differs」になるようです。</p>
<p>$ make<br>
gcc -DRUBY_DEBUG_ENV -O2 -g -Wall -Wformat=2 -Wundef -Wno-parentheses -fPIC -I. -I.ext/include/x86_64-linux -I../include -I.. -DRUBY_EXPORT -o parse.o -c parse.c<br>
In file included from ../parse.y:23:<br>
../id.h:68:7: warning: "tUPLUS" is not defined<br>
../id.h:69:2: error: #error tUPLUS differs<br>
../id.h:162:5: warning: "SUPPORT_JOKE" is not defined<br>
../id.h:168:5: warning: "SUPPORT_JOKE" is not defined<br>
In file included from ../parse.y:41:<br>
../id.c:43:5: warning: "SUPPORT_JOKE" is not defined<br>
parse.c:884:6: warning: "YYENABLE_NLS" is not defined<br>
parse.c:4107:6: warning: "YYLTYPE_IS_TRIVIAL" is not defined<br>
make: *** [parse.o] Error 1<br>
$<br>
=end</p>
Ruby master - Bug #884 (Closed): Insecure operation: -r
https://bugs.ruby-lang.org/issues/884
2008-12-15T20:06:07Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
以下のようにするとエラーメッセージの中に謎の-rが出てきます。</p>
<p>% ruby-trunk -ve '$SAFE=4;open("")'<br>
ruby 1.9.1 (2008-12-14 revision 20736) [i686-linux]<br>
-e:1:in <code>open': Insecure operation: -r (SecurityError) from -e:1:in </code>'<br>
%<br>
=end</p>
Ruby master - Bug #883 (Closed): Failure: test_handle_special_CROSSREF_no_underscore(TestRDocMark...
https://bugs.ruby-lang.org/issues/883
2008-12-15T19:52:47Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
test failed with full path</p>
<p>% ruby-trunk -v<br>
ruby 1.9.1 (2008-12-15 revision 20750) [i686-linux]<br>
% ruby-trunk test/rdoc/test_rdoc_markup_to_html_crossref.rb<br>
nil<br>
Loaded suite test/rdoc/test_rdoc_markup_to_html_crossref<br>
Started<br>
.<br>
Finished in 0.153602 seconds.</p>
<p>1 tests, 210 assertions, 0 failures, 0 errors, 0 skips<br>
% ruby-trunk $(pwd)/test/rdoc/test_rdoc_markup_to_html_crossref.rb<br>
nil<br>
Loaded suite /home/kazu/wc/ruby-lang/trunk/test/rdoc/test_rdoc_markup_to_html_crossref<br>
Started<br>
F<br>
Finished in 0.041989 seconds.</p>
<ol>
<li>Failure:<br>
test_handle_special_CROSSREF_no_underscore(TestRDocMarkupToHtmlCrossref) [/home/kazu/wc/ruby-lang/trunk/test/rdoc/test_rdoc_markup_to_html_crossref.rb:87]:<br>
Expected "<p> <a href="../files/home/kazu/wc/ruby-lang/trunk/test/rdoc/rdoc_markup_to_html_crossref_reference_rb.html">/home/kazu/wc/ruby-lang/trunk/test/rdoc/rdoc_markup_to_html_crossref_reference.rb </p> ", not "<p> /home/kazu/wc/ruby-lang/trunk/test/rdoc/rdoc_markup_to_html_crossref_reference.rb </p> ".</li>
</ol>
<p>1 tests, 29 assertions, 1 failures, 0 errors, 0 skips<br>
%<br>
=end</p>
Ruby master - Bug #875 (Closed): Failure: test_power(TestBigDecimal)
https://bugs.ruby-lang.org/issues/875
2008-12-15T02:14:21Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
x86_64-linuxなlennyの環境でtest_power(TestBigDecimal)がFailureになります。<br>
それから「warning: shadowing outer local variable - x」というwarningやnilも出ているようです。</p>
<p>% ruby-trunk_64 -v test/bigdecimal/test_bigdecimal.rb<br>
ruby 1.9.1 (2008-12-14 revision 20739) [x86_64-linux]<br>
test/bigdecimal/test_bigdecimal.rb:262: warning: shadowing outer local variable - x<br>
test/bigdecimal/test_bigdecimal.rb:263: warning: shadowing outer local variable - x<br>
nil<br>
Loaded suite test/bigdecimal/test_bigdecimal<br>
Started<br>
....................................F..................<br>
Finished in 0.068948 seconds.</p>
<ol>
<li>Failure:<br>
test_power(TestBigDecimal) [test/bigdecimal/test_bigdecimal.rb:585]:<br>
<0.0123456790123457> expected but was<br>
<#<BigDecimal:faa000,'0.1234567912 3456791234 5679123456 7912345679 1234567912 345679E-1',63(63)>>.</li>
</ol>
<p>55 tests, 338 assertions, 1 failures, 0 errors, 0 skips<br>
=end</p>
Ruby master - Bug #874 (Closed): cannot make with bison-2.4.1
https://bugs.ruby-lang.org/issues/874
2008-12-15T00:00:17Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
parse.[ch]から<br>
#define tLAST_TOKEN 376<br>
などの#defineがなくなっていて、ビルドできません。</p>
<p>$ rm parse.c<br>
$ make<br>
bison -d -o y.tab.c ../parse.y<br>
sed -f ../tool/ytab.sed -e "/^#/s!y.tab.c!parse.c!" y.tab.c > parse.c.new<br>
sed -e "/^#line.*y.tab.h/d;/^#line.*parse.y/d" y.tab.h > parse.h.new<br>
parse.h updated<br>
gcc -DRUBY_DEBUG_ENV -O2 -g -Wall -Wformat=2 -Wundef -Wno-parentheses -fPIC -I. -I.ext/include/x86_64-linux -I../include -I.. -DRUBY_EXPORT -o parse.o -c parse.c<br>
In file included from ../parse.y:23:<br>
../id.h:36: error: redeclaration of enumerator ‘tUPLUS’<br>
parse.h:105: error: previous definition of ‘tUPLUS’ was here<br>
../id.h:37: error: redeclaration of enumerator ‘tUMINUS’<br>
parse.h:106: error: previous definition of ‘tUMINUS’ was here<br>
(以下略)<br>
=end</p>
Ruby master - Bug #675 (Closed): Failure: test_delete_with_block(TestSDBM)
https://bugs.ruby-lang.org/issues/675
2008-10-22T03:38:43Z
znz (Kazuhiro NISHIYAMA)
<p>=begin</p>
<ol>
<li>Failure:<br>
test_delete_with_block(TestSDBM) [.../trunk/test/sdbm/test_sdbm.rb:375]:<br>
<"called block"> expected but was<br>
<"no called block">.<br>
も調べてみました。</li>
</ol>
<p>ext/sdbm/init.cのfsdbm_deleteで<br>
ExportStringValue(keystr);<br>
で別のオブジェクトになる可能性があるkeystrを<br>
if (rb_block_given_p()) return rb_yield(keystr);<br>
でrb_yieldに渡しているのにテストの方で<br>
key = 'no called block'<br>
assert_equal(:blockval,<br>
@sdbm.delete(key) {|k| k.replace 'called block'; :blockval})<br>
assert_equal('called block', key)<br>
のように同じオブジェクトが来ると仮定してString#replaceを呼んでいるからのようです。<br>
=end</p>
Ruby master - Bug #674 (Closed): Failure: test_aset(TestSDBM)
https://bugs.ruby-lang.org/issues/674
2008-10-22T03:18:21Z
znz (Kazuhiro NISHIYAMA)
<p>=begin</p>
<ol>
<li>Failure:<br>
test_aset(TestSDBM) [.../trunk/test/sdbm/test_sdbm.rb:174]:<br>
<""> expected but was<br>
<"barbarfoo">.<br>
について調べてみました。</li>
</ol>
<p>ext/sdbm/init.cのfsdbm_fetchの<br>
return rb_external_str_new(value.dptr, value.dsize);<br>
でvalue = {dptr = "barbarfoo", dsize = 0}となっていて、<br>
lenに0を指定しているのにstring.cのrb_external_str_new_with_encが<br>
if (len == 0 && ptr) len = strlen(ptr);<br>
でlenを無視してstrlenしてしまっているのが原因のようです。<br>
=end</p>
Ruby master - Bug #570 (Closed): emacs21で色が付かない
https://bugs.ruby-lang.org/issues/570
2008-09-16T21:15:55Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
西山和広です。</p>
<p>emacs21でtrunkのruby-mode.elを使うと色が付きません。</p>
<a name="syntax-ppssというのが無いから"></a>
<h1 >syntax-ppssというのが無いから?<a href="#syntax-ppssというのが無いから" class="wiki-anchor">¶</a></h1>
<p>--<br>
|ZnZ(ゼット エヌ ゼット)<br>
|西山和広(Kazuhiro NISHIYAMA)<br>
=end</p>
Ruby 1.8 - Bug #569 (Closed): emacs21でruby-mode.el
https://bugs.ruby-lang.org/issues/569
2008-09-16T20:53:51Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
西山和広です。</p>
<p>At Mon, 26 May 2008 15:58:47 +0900,<br>
Kazuhiro NISHIYAMA wrote:</p>
<blockquote>
<p>emacs21でruby-mode.elが<br>
File mode specification error: (void-function run-mode-hooks)<br>
となって動きません。</p>
</blockquote>
<p>ruby_1_8の方は動かないままのようです。</p>
<a name="Index-miscruby-modeel"></a>
<h1 >Index: misc/ruby-mode.el<a href="#Index-miscruby-modeel" class="wiki-anchor">¶</a></h1>
<p>--- misc/ruby-mode.el (revision 16583)<br>
+++ misc/ruby-mode.el (working copy)<br>
@@ -312,7 +312,9 @@<br>
(set (make-local-variable 'font-lock-syntax-table) ruby-font-lock-syntax-table)<br>
(set (make-local-variable 'font-lock-syntactic-keywords) ruby-font-lock-syntactic-keywords)</p>
<ul>
<li>(run-mode-hooks 'ruby-mode-hook))</li>
</ul>
<ul>
<li>(if (fboundp 'run-mode-hooks)</li>
<li>
<pre><code> (run-mode-hooks 'ruby-mode-hook)
</code></pre>
</li>
<li>(run-hooks 'ruby-mode-hook)))</li>
</ul>
<p>(defun ruby-current-indentation ()<br>
(save-excursion</p>
<p>--<br>
|ZnZ(ゼット エヌ ゼット)<br>
|西山和広(Kazuhiro NISHIYAMA)<br>
=end</p>
Ruby master - Bug #495 (Closed): Failure: test_priority(TestThread)
https://bugs.ruby-lang.org/issues/495
2008-08-25T21:01:32Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
CPUなどの他の環境も影響しそうですが、<br>
ruby 1.9.0 (2008-08-25 revision 18832) [i686-linux]<br>
とUbuntu 8.04.1の環境で以下のFailureが発生します。</p>
<ol>
<li>Failure:<br>
test_priority(TestThread) [test/ruby/test_thread.rb:129]:<br>
<a href="https://blade.ruby-lang.org/ruby-dev/33124">[ruby-dev:33124]</a>.<br>
is not true.</li>
</ol>
<p>メッセージにc1,c2を表示するようにしたところ、<br>
c1=1708255,c2=1614873.<br>
c1=1768679,c2=1626401.<br>
c1=1799550,c2=1721482.<br>
c1=1796999,c2=1651275.<br>
c1=1781870,c2=1725428.<br>
のような感じで1.5倍までの差は出ないようです。<br>
=end</p>
Ruby master - Feature #494 (Closed): Errno.const_missing
https://bugs.ruby-lang.org/issues/494
2008-08-25T19:58:23Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
<a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Failure: test_dup(TestIO) (Closed)" href="https://bugs.ruby-lang.org/issues/493">#493</a> <a href="/issues/493">[ruby-dev:35957]</a>のエラーメッセージでErrno::NOMEMがErrno::NOERRORに<br>
なってしまっている(Errno::ENOMEMのtypo?)ように、typoに気づきにくくなるので<br>
Errno.const_missingはなくした方が良いのではないでしょうか?<br>
=end</p>
Ruby master - Bug #493 (Closed): Failure: test_dup(TestIO)
https://bugs.ruby-lang.org/issues/493
2008-08-25T19:56:19Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
ruby 1.9.0 (2008-08-25 revision 18832) [i686-linux]<br>
とUbuntu 8.04.1の環境でtest-allで以下のFailureが発生します。<br>
test/ruby/test_io.rb単独だと起きないようです。</p>
<ol start="2">
<li>Failure:<br>
test_dup(TestIO)<br>
[/home/kazu/wc/ruby-lang/trunk/test/ruby/test_io.rb:640:in <code>block in test_dup' /home/kazu/wc/ruby-lang/trunk/test/ruby/test_io.rb:585:in </code>rescue in pipe2'<br>
/home/kazu/wc/ruby-lang/trunk/test/ruby/test_io.rb:591:in <code>pipe2' /home/kazu/wc/ruby-lang/trunk/test/ruby/test_io.rb:639:in </code>test_dup']:<br>
<[Errno::EMFILE, Errno::ENFILE, Errno::NOERROR]> exception expected but none was thrown.<br>
=end</li>
</ol>
Ruby master - Bug #480 (Closed): Failure: test_has_expires_eh(TestTupleBag)
https://bugs.ruby-lang.org/issues/480
2008-08-24T01:33:24Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
たぶんすべての環境で出ている以下のFailureですが、<br>
test/rinda/test_tuplebag.rbで<br>
def test_has_expires_eh<br>
assert_equal false, @tb.has_expires?<br>
となっていて、has_expires?はlib/rinda/tuplespace.rbで<br>
def has_expires?<br>
@enum.find do |tuple|<br>
tuple.expires<br>
end<br>
end<br>
となっていて、Enumerable#findは見つかった要素またはnilを返すため、<br>
falseは返ってこないからのようです。</p>
<ol>
<li>Failure:<br>
test_has_expires_eh(TestTupleBag) [/home/akr/chkbuild/tmp/build/ruby-trunk/20080823T232503/ruby/test/rinda/test_tuplebag.rb:137]:<br>
expected but was<br>
.<br>
=end</li>
</ol>
Ruby master - Bug #467 (Closed): Failure: test_rlimit_value(TestProcess)
https://bugs.ruby-lang.org/issues/467
2008-08-21T20:33:39Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
ruby 1.9.0 (2008-08-21 revision 18741) [powerpc-darwin9.4.0]<br>
の環境でtest_rlimit_value(TestProcess)がFailureになります。</p>
<ol start="61">
<li>Failure:<br>
test_rlimit_value(TestProcess) [/Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/ruby/test_process.rb:111]:<br>
<a href="Errno::EPERM" class="external">Errno::EPERM</a> exception expected but was<br>
Class: <a href="Errno::EINVAL" class="external">Errno::EINVAL</a><br>
Message: <"Invalid argument - setrlimit"><br>
---Backtrace---<br>
/Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/ruby/test_process.rb:111:in <code>setrlimit' /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/ruby/test_process.rb:111:in </code>block in test_rlimit_value'<br>
/Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/ruby/test_process.rb:111:in `test_rlimit_value'</li>
</ol>
<hr>
<p>以下のパッチで通るようになりますが、問題ないでしょうか?</p>
<a name="Index-testrubytest_processrb"></a>
<h1 >Index: test/ruby/test_process.rb<a href="#Index-testrubytest_processrb" class="wiki-anchor">¶</a></h1>
<p>--- test/ruby/test_process.rb (revision 18753)<br>
+++ test/ruby/test_process.rb (working copy)<br>
@@ -108,8 +108,8 @@<br>
def test_rlimit_value<br>
return unless rlimit_exist?<br>
assert_raise(ArgumentError) { Process.setrlimit(:CORE, :FOO) }</p>
<ul>
<li>assert_raise(Errno::EPERM) { Process.setrlimit(:NOFILE, :INFINITY) }</li>
<li>assert_raise(Errno::EPERM) { Process.setrlimit(:NOFILE, "INFINITY") }</li>
</ul>
<ul>
<li>assert_raise(Errno::EPERM, Errno::EINVAL) { Process.setrlimit(:NOFILE, :INFINITY) }</li>
<li>assert_raise(Errno::EPERM, Errno::EINVAL) { Process.setrlimit(:NOFILE, "INFINITY") }<br>
end</li>
</ul>
<pre><code>TRUECOMMAND = [RUBY, '-e', '']
</code></pre>
<p>=end</p>
Ruby master - Bug #465 (Closed): `Errno::ENOTCONN: Socket is not connected' in test/net/imap
https://bugs.ruby-lang.org/issues/465
2008-08-21T19:11:49Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
test/net/imapでも同様にErrno::ENOTCONNになります。</p>
<ol start="48">
<li>Error:<br>
test_unexpected_eof(IMAPTest):<br>
Errno::ENOTCONN: Socket is not connected<br>
/Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/lib/net/imap.rb:295:in <code>shutdown' /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/lib/net/imap.rb:295:in </code>rescue in disconnect'<br>
/Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/lib/net/imap.rb:290:in <code>disconnect' /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/net/imap/test_imap.rb:108:in </code>test_unexpected_eof'</li>
</ol>
<p>以下パッチです。</p>
<a name="Index-libnetimaprb"></a>
<h1 >Index: lib/net/imap.rb<a href="#Index-libnetimaprb" class="wiki-anchor">¶</a></h1>
<p>--- lib/net/imap.rb (revision 18748)<br>
+++ lib/net/imap.rb (working copy)<br>
@@ -288,11 +288,15 @@<br>
# Disconnects from the server.<br>
def disconnect<br>
begin</p>
<ul>
<li>
<pre><code> # try to call SSL::SSLSocket#io.
</code></pre>
</li>
<li>
<pre><code> @sock.io.shutdown
</code></pre>
</li>
<li>
<pre><code> rescue NoMethodError
</code></pre>
</li>
<li>
<pre><code> # @sock is not an SSL::SSLSocket.
</code></pre>
</li>
<li>
<pre><code> @sock.shutdown
</code></pre>
</li>
</ul>
<ul>
<li>
<pre><code> begin
</code></pre>
</li>
<li>
<pre><code> # try to call SSL::SSLSocket#io.
</code></pre>
</li>
<li>
<pre><code> @sock.io.shutdown
</code></pre>
</li>
<li>
<pre><code> rescue NoMethodError
</code></pre>
</li>
<li>
<pre><code> # @sock is not an SSL::SSLSocket.
</code></pre>
</li>
<li>
<pre><code> @sock.shutdown
</code></pre>
</li>
<li>
<pre><code> end
</code></pre>
</li>
<li>
<pre><code> rescue Errno::ENOTCONN
</code></pre>
</li>
<li>
<pre><code> # ignore `Errno::ENOTCONN: Socket is not connected' on some platforms.
end
@receiver_thread.join
@sock.close
</code></pre>
</li>
</ul>
<p>=end</p>
Ruby master - Bug #464 (Closed): `Errno::ENOTCONN: Socket is not connected' in test/openssl/test_...
https://bugs.ruby-lang.org/issues/464
2008-08-21T19:10:00Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
test/openssl/test_ssl.rbでも同様にErrno::ENOTCONNになります。</p>
<ol start="49">
<li>Error:<br>
test_client_auth(OpenSSL::TestSSL):<br>
Errno::ENOTCONN: Socket is not connected<br>
/Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/openssl/test_ssl.rb:132:in <code>shutdown' /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/openssl/test_ssl.rb:132:in </code>start_server'<br>
/Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/openssl/test_ssl.rb:231:in `test_client_auth'</li>
</ol>
<p>以下パッチです。</p>
<a name="Index-testopenssltest_sslrb"></a>
<h1 >Index: test/openssl/test_ssl.rb<a href="#Index-testopenssltest_sslrb" class="wiki-anchor">¶</a></h1>
<p>--- test/openssl/test_ssl.rb (revision 18748)<br>
+++ test/openssl/test_ssl.rb (working copy)<br>
@@ -129,7 +129,14 @@<br>
block.call(server, port.to_i)<br>
ensure<br>
begin</p>
<ul>
<li>
<pre><code> tcps.shutdown if (tcps)
</code></pre>
</li>
</ul>
<ul>
<li>
<pre><code> begin
</code></pre>
</li>
<li>
<pre><code> tcps.shutdown
</code></pre>
</li>
<li>
<pre><code> rescue Errno::ENOTCONN
</code></pre>
</li>
<li>
<pre><code> # when `Errno::ENOTCONN: Socket is not connected' on some platforms,
</code></pre>
</li>
<li>
<pre><code> # call #close instead of #shutdown.
</code></pre>
</li>
<li>
<pre><code> tcps.close
</code></pre>
</li>
<li>
<pre><code> tcps = nil
</code></pre>
</li>
<li>
<pre><code> end if (tcps)
if (server)
server.join(5)
if server.alive?
</code></pre>
</li>
</ul>
<p>=end</p>
Ruby master - Bug #463 (Closed): `Errno::ENOTCONN: Socket is not connected' in test/net/http
https://bugs.ruby-lang.org/issues/463
2008-08-21T17:21:31Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
Mac OS Xで以下のようにErrno::ENOTCONNになります。<br>
その影響で他のテストのいくつかもErrno::EADDRINUSEなどで失敗します。</p>
<ol>
<li>Error:<br>
test_certificate_verify_failure(TestNetHTTPS):<br>
Errno::ENOTCONN: Socket is not connected<br>
/Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/.ext/common/openssl/ssl.rb:157:in <code>shutdown' /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/.ext/common/openssl/ssl.rb:157:in </code>shutdown'<br>
/Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/lib/webrick/server.rb:133:in <code>block in shutdown' /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/lib/webrick/server.rb:128:in </code>each'<br>
/Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/lib/webrick/server.rb:128:in <code>shutdown' /Users/chkbuild/chkbuild/tmp/build/ruby-trunk/20080821T033314/ruby/test/net/http/utils.rb:34:in </code>teardown'</li>
</ol>
<p>以下のパッチで直るようなのですが問題ないでしょうか?</p>
<a name="Index-libwebrickserverrb"></a>
<h1 >Index: lib/webrick/server.rb<a href="#Index-libwebrickserverrb" class="wiki-anchor">¶</a></h1>
<p>--- lib/webrick/server.rb (revision 18748)<br>
+++ lib/webrick/server.rb (working copy)<br>
@@ -130,9 +130,17 @@<br>
addr = s.addr<br>
@logger.debug("close TCPSocket(#{addr[2]}, #{addr[1]})")<br>
end</p>
<ul>
<li>
<pre><code> s.shutdown
</code></pre>
</li>
<li>
<pre><code> unless @config[:ShutdownSocketWithoutClose]
</code></pre>
</li>
</ul>
<ul>
<li>
<pre><code> begin
</code></pre>
</li>
<li>
<pre><code> s.shutdown
</code></pre>
</li>
<li>
<pre><code> rescue Errno::ENOTCONN
</code></pre>
</li>
<li>
<pre><code> # when `Errno::ENOTCONN: Socket is not connected' on some platforms,
</code></pre>
</li>
<li>
<pre><code> # call #close instead of #shutdown.
</code></pre>
</li>
<li>
<pre><code> # (ignore @config[:ShutdownSocketWithoutClose])
s.close
</code></pre>
</li>
<li>
<pre><code> else
</code></pre>
</li>
<li>
<pre><code> unless @config[:ShutdownSocketWithoutClose]
</code></pre>
</li>
<li>
<pre><code> s.close
</code></pre>
</li>
<li>
<pre><code> end
end
}
@listeners.clear
</code></pre>
</li>
</ul>
<p>=end</p>
Ruby master - Bug #344 (Closed): File.grpowned?のテスト
https://bugs.ruby-lang.org/issues/344
2008-07-23T07:49:35Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
西山和広です。</p>
<p>Mac OS Xでassert(File.grpowned?(@file))がFailureになります。</p>
<ol start="61">
<li>
<p>Failure:<br>
test_owned_p(TestFileExhaustive) [/Users/nishiyamakazuhiro/wc/ruby-lang/trunk/test/ruby/test_file_exhaustive.rb:240]:<br>
is not true.</p>
</li>
<li>
<p>Failure:<br>
test_stat_owned_p(TestFileExhaustive) [/Users/nishiyamakazuhiro/wc/ruby-lang/trunk/test/ruby/test_file_exhaustive.rb:698]:<br>
is not true.</p>
</li>
</ol>
<p>テストを実行するユーザがDir.mktmpdirの/tmp/のグループに入っていなくて、<br>
ディレクトリにsetgidされていなくてもディレクトリのグループが、新規作成<br>
される中のファイルに継承される環境(BSD系?)で起きるのではないかと思います。</p>
<p>$ touch ~/foo /tmp/foo<br>
$ ls -ld ~ ~/foo /tmp /tmp/ /tmp/foo<br>
drwxr-xr-x+ 26 nishiyamakazuhiro staff 884 Jul 23 07:46 /Users/nishiyamakazuhiro<br>
-rw-r--r-- 1 nishiyamakazuhiro staff 0 Jul 23 07:47 /Users/nishiyamakazuhiro/foo<br>
lrwxr-xr-x@ 1 root admin 11 Jul 16 16:29 /tmp -> private/tmp<br>
drwxrwxrwt 9 root wheel 306 Jul 23 07:46 /tmp/<br>
-rw-r--r-- 1 nishiyamakazuhiro wheel 0 Jul 23 07:47 /tmp/foo<br>
$ id<br>
uid=501(nishiyamakazuhiro) gid=20(staff) groups=20(staff),98(_lpadmin),81(_appserveradm),101(com.apple.sharepoint.group.1),79(_appserverusr),80(admin)<br>
$</p>
<p>--<br>
|ZnZ(ゼット エヌ ゼット)<br>
|西山和広(Kazuhiro NISHIYAMA)<br>
=end</p>
Ruby master - Bug #256 (Rejected): defined?(Gem::RubyGemsVersion) behaves strange
https://bugs.ruby-lang.org/issues/256
2008-07-11T18:46:23Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
% ruby-trunk -ve 'p defined?(Gem::RubyGemsVersion)<br>
p Gem::RubyGemsVersion<br>
p defined?(Gem::RubyGemsVersion)'<br>
ruby 1.9.0 (2008-07-11 revision 18024) [i686-linux]<br>
nil<br>
"1.2.0.1824"<br>
"constant"<br>
%<br>
=end</p>
Ruby master - Feature #235 (Closed): default charset of rdoc
https://bugs.ruby-lang.org/issues/235
2008-07-08T20:40:07Z
znz (Kazuhiro NISHIYAMA)
<p>=begin<br>
I think that default charset of rdoc should be 'utf-8'.<br>
The current default 'iso-8859-1' is not useful, because it can not include characters in Japanese and/or other languages, and not supported by ruby(1.8.x) interpreter.<br>
=end</p>