https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112010-07-13T06:06:51ZRuby Issue Tracking SystemBackport191 - Bug #3561: ruby-1.9.3-r28570 test/unit gem activation failurehttps://redmine.ruby-lang.org/issues/3561?journal_id=122982010-07-13T06:06:51Ztenderlovemaking (Aaron Patterson)tenderlove@ruby-lang.org
<ul></ul><p>=begin<br>
I don't believe this is a bug.</p>
<p>The problem is that gem prelude prefers files installed as gems over files from stdlib. That behavior is opposite of rubygems.</p>
<p>The code you've listed works in 1.8.* because test/unit and the testrunner ship with 1.8.</p>
<p>The code you've listed works in 1.9.1 because gem prelude behaves opposite to rubygems. In 1.9, you must install the 'test-unit' gem, and since gem prelude prefers gem files over stdlib files, your require succeeds.</p>
<p>Evan has restored rubygems to work "how it's supposed to work", so I believe this isn't a bug. Instead, you should write your code like so:</p>
<p>require 'rubygems'<br>
gem 'test-unit'<br>
require 'test/unit'<br>
require 'test/unit/ui/console/testrunner'</p>
<p>=end</p> Backport191 - Bug #3561: ruby-1.9.3-r28570 test/unit gem activation failurehttps://redmine.ruby-lang.org/issues/3561?journal_id=123002010-07-13T06:08:31Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul></ul><p>=begin<br>
Yes, whenever you use a gem that replaces stdlib functionality you should use #gem before #require.<br>
=end</p> Backport191 - Bug #3561: ruby-1.9.3-r28570 test/unit gem activation failurehttps://redmine.ruby-lang.org/issues/3561?journal_id=811912019-08-27T17:07:11Zjeremyevans0 (Jeremy Evans)merch-redmine@jeremyevans.net
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/81191/diff?detail_id=54892">diff</a>)</li><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul>