Ruby Issue Tracking System: Issueshttps://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112009-11-09T06:41:52ZRuby Issue Tracking System
Redmine Ruby master - Feature #2348 (Rejected): RBTree Should be Added to the Standard Libraryhttps://bugs.ruby-lang.org/issues/23482009-11-09T06:41:52ZJEG2 (James Gray)jeg2@ruby-lang.org
<p>=begin<br>
The merits of this library have been discussed on Ruby core, with the strengths best summarized by this post:</p>
<p><a href="http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/26602" class="external">http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/26602</a></p>
<p>RBTree has now been fixed to run on Ruby 1.9:</p>
<p><a href="http://github.com/skade/rbtree" class="external">http://github.com/skade/rbtree</a></p>
<p>I think we should now give serious consideration to bringing it into the standard library.<br>
=end</p> Ruby master - Bug #1381 (Closed): Confusing Encoding Errorhttps://bugs.ruby-lang.org/issues/13812009-04-15T06:32:29ZJEG2 (James Gray)jeg2@ruby-lang.org
<p>=begin<br>
When I reuse a Regexp object, the Encoding seems unchanged but an error message can report something different from what I am seeing:</p>
<pre><code> $ cat enc_error_bug.rb
re = /./
puts re.encoding.name
"a".encode("ASCII-8BIT") =~ re if $DEBUG
puts re.encoding.name
"a".encode("UTF-16BE") =~ re
$ ruby enc_error_bug.rb
US-ASCII
US-ASCII
enc_error_bug.rb:5:in `=~': incompatible encoding regexp match (US-ASCII regexp with UTF-16BE string) (Encoding::CompatibilityError)
from enc_error_bug.rb:5:in `<main>'
$ ruby -d enc_error_bug.rb
US-ASCII
US-ASCII
Exception `Encoding::CompatibilityError' at enc_error_bug.rb:5 - incompatible encoding regexp match (ASCII-8BIT regexp with UTF-16BE string)
enc_error_bug.rb:5:in `=~': incompatible encoding regexp match (ASCII-8BIT regexp with UTF-16BE string) (Encoding::CompatibilityError)
from enc_error_bug.rb:5:in `<main>'
</code></pre>
<p>Notice how the Regexp's Encoding stays US-ASCII, but the error message calls it ASCII-8BIT if I first match it as against an ASCII-8BIT String.<br>
=end</p> Ruby 1.8 - Backport #1068 (Closed): Ruby Cannot Handle Some UIDshttps://bugs.ruby-lang.org/issues/10682009-01-29T01:02:31ZJEG2 (James Gray)jeg2@ruby-lang.org
<p>=begin<br>
This shows the main problem:</p>
<p>$ sudo ruby -r etc -e 'n = Etc.getpwnam("nobody"); p n.uid; Process.uid = n.uid'<br>
Password:<br>
ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-darwin9.4.0]<br>
4294967294<br>
-e:1:in <code>uid=': bignum too big to convert into </code>long' (RangeError)<br>
from -e:1</p>
<p>The real UID for the nobody user on my system (Mac OS X 10.5.6) is -2. Thus it seems at least some systems use signed UID's and Ruby can't handle that.</p>
<p>The above example is from Ruby 1.8.6. Ruby 1.9 does seem to properly switch users, but it still shows the UID's incorrectly:</p>
<p>$ sudo ruby_dev -v -r etc -e 'n = Etc.getpwnam("nobody"); p n.uid; Process.uid = n.uid; p Process.uid; p Etc.getpwuid(Process.uid)'<br>
ruby 1.9.1 (2008-12-30 patchlevel-0 revision 21203) [i386-darwin9.6.0]<br>
4294967294<br>
4294967294<br>
#<struct Struct::Passwd name="nobody", passwd="*", uid=4294967294, gid=4294967294, gecos="Unprivileged User", dir="/var/empty", shell="/usr/bin/false", change=0, uclass="", expire=0><br>
=end</p> Ruby master - Bug #629 (Closed): Test/Unit Seems Brokenhttps://bugs.ruby-lang.org/issues/6292008-10-10T12:55:37ZJEG2 (James Gray)jeg2@ruby-lang.org
<p>=begin<br>
I can't get tests to run using a fresh build of Ruby 1.9:</p>
<p>$ ruby_dev -vI lib:test/csv test/csv/ts_all.rb<br>
ruby 1.9.0 (2008-10-10 revision 0) [i386-darwin9.5.0]<br>
Loaded suite test/csv/ts_all<br>
Started</p>
<p>Finished in 0.000025 seconds.</p>
<p>0 tests, 0 assertions, 0 failures, 0 errors</p>
<p>That file loads many tests.<br>
=end</p> Ruby master - Bug #607 (Closed): Mini/Unit Break assert_send()https://bugs.ruby-lang.org/issues/6072008-09-28T09:03:05ZJEG2 (James Gray)jeg2@ruby-lang.org
<p>=begin<br>
$ cat bug.rb<br>
require "test/unit"</p>
<p>class TestAssertSend < Test::Unit::TestCase<br>
def test_bug<br>
assert_send([1, :<, 2])<br>
end<br>
endGalactica:~/Desktop$ ruby bug.rb # test/unit<br>
Loaded suite bug<br>
Started<br>
.<br>
Finished in 0.002001 seconds.</p>
<p>1 tests, 1 assertions, 0 failures, 0 errors<br>
Galactica:~/Desktop$ ruby_dev bug.rb # mini/unit<br>
Loaded suite bug<br>
Started<br>
E<br>
Finished in 0.000978 seconds.</p>
<ol>
<li>Error:<br>
test_bug(TestAssertSend):<br>
TypeError: #<a href="Proc:0x0fe434@/usr/local/lib/ruby/1.9.0/mini/test.rb:210" class="external">Proc:0x0fe434@/usr/local/lib/ruby/1.9.0/mini/test.rb:210</a> is not a symbol<br>
/usr/local/lib/ruby/1.9.0/mini/test.rb:163:in <code>assert_send' bug.rb:5:in </code>test_bug'<br>
/usr/local/lib/ruby/1.9.0/mini/test.rb:410:in <code>run' /usr/local/lib/ruby/1.9.0/mini/test.rb:389:in </code>block (2 levels) in run_test_suites'<br>
/usr/local/lib/ruby/1.9.0/mini/test.rb:383:in <code>each' /usr/local/lib/ruby/1.9.0/mini/test.rb:383:in </code>block in run_test_suites'<br>
/usr/local/lib/ruby/1.9.0/mini/test.rb:382:in <code>each' /usr/local/lib/ruby/1.9.0/mini/test.rb:382:in </code>run_test_suites'<br>
/usr/local/lib/ruby/1.9.0/mini/test.rb:362:in <code>run' /usr/local/lib/ruby/1.9.0/mini/test.rb:311:in </code>block in autorun'</li>
</ol>
<p>1 tests, 0 assertions, 0 failures, 1 errors<br>
=end</p> Ruby master - Bug #606 (Closed): Ruby Fails to Transcode Empty Stringshttps://bugs.ruby-lang.org/issues/6062008-09-28T08:56:01ZJEG2 (James Gray)jeg2@ruby-lang.org
<p>=begin<br>
$ ruby_dev -ve 'p "abc".encode("Big5"); p "".encode("Big5")'<br>
ruby 1.9.0 (2008-09-27 revision 0) [i386-darwin9.5.0]<br>
"abc"<br>
-e:1:in <code>encode': code converter not found (UTF-8 to Big5) (Encoding::ConverterNotFoundError) from -e:1:in </code>'<br>
=end</p> Ruby master - Bug #563 (Closed): Regexp::escape is not Encoding Awarehttps://bugs.ruby-lang.org/issues/5632008-09-15T06:58:49ZJEG2 (James Gray)jeg2@ruby-lang.org
<p>=begin<br>
Escaping an encoded String can damage the encoding:</p>
<blockquote>
<blockquote>
<p>s = "+"<br>
=> "+"<br>
s.encode!("UTF-16BE")<br>
=> "\x00+"<br>
re = Regexp.escape(s)<br>
=> "\+"<br>
re.encoding<br>
=> #<a href="Encoding:UTF-16BE" class="external">Encoding:UTF-16BE</a><br>
=end</p>
</blockquote>
</blockquote> Ruby master - Bug #562 (Closed): String#encode Behaving Like String#encode!https://bugs.ruby-lang.org/issues/5622008-09-15T00:37:29ZJEG2 (James Gray)jeg2@ruby-lang.org
<p>=begin<br>
String#encode is changing the original String in the version of Ruby I built yesterday:</p>
<p>$ cat bug.rb<br>
#!/usr/bin/env ruby -w</p>
<a name="encoding-UTF-8"></a>
<h1 >encoding: UTF-8<a href="#encoding-UTF-8" class="wiki-anchor">¶</a></h1>
<p>a = "James"<br>
b = a.encode("SJIS")<br>
p a.encoding<br>
p b.encoding<br>
$ ruby_dev bug.rb<br>
#<a href="Encoding:Shift_JIS" class="external">Encoding:Shift_JIS</a><br>
#<a href="Encoding:Shift_JIS" class="external">Encoding:Shift_JIS</a></p>
<p>James Edward Gray II<br>
=end</p> Ruby 1.8 - Bug #459 (Closed): Scanf Seems to Have Issues with Single Digit Integershttps://bugs.ruby-lang.org/issues/4592008-08-21T03:38:06ZJEG2 (James Gray)jeg2@ruby-lang.org
<p>=begin<br>
Switching a trivial example to use single digit integers causes scanf() to perform unexpectedly:</p>
<p>$ ruby -r scanf -e '"Name James Age 32 Name Greg Age 22".scanf("Name %s Age %i") { |name, age| p [name, age] }'<br>
["James", 32]<br>
["Greg", 22]<br>
$ ruby -r scanf -e '"Name James Computers 2 Name Greg Computers 4".scanf("Name %s Age %i") { |name, age| p [name, age] }'<br>
["James", nil]<br>
=end</p>