[ruby-core:75381] [Ruby trunk Bug#12351] ruby-1.9.3.4 (Ubuntu): undefined variable in MiniTest::Unit::Runner::Worker (unit.rb:328)

From: nobu@...
Date: 2016-05-06 04:39:52 UTC
List: ruby-core #75381
Issue #12351 has been updated by Nobuyoshi Nakada.

Description updated

----------------------------------------
Bug #12351: ruby-1.9.3.4 (Ubuntu): undefined variable in MiniTest::Unit::Runner::Worker (unit.rb:328)
https://bugs.ruby-lang.org/issues/12351#change-58506

* Author: J Batista
* Status: Third Party's Issue
* Priority: Normal
* Assignee: 
* ruby -v: 1.9.3p484
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
An undefined variable in `MiniTest::Unit::Runner::Worker` causes `rake` execution to fail (status code 1) when performing tests. (Test case was running rake with code from https://github.com/blackducksoftware/ohloh_scm).

The cause is attempting to use an undefined class variable `@@installed_at_exit` on method `autorun` of class `Worker`. Possible solution: change

```ruby
at_exit {
# ...
} unless @@installed_at_exit
```

to

```ruby
at_exit {
# ...
} unless (defined?(@@installed_at_exit) and @@installed_at_exit)
```

Attachment (unit.rb.patch) is a diff patch for the affected file.

This affects Ubuntu 14.04 and related distributions (Lubuntu). Reported downstream as [Ubuntu Bug 1578547](https://bugs.launchpad.net/ubuntu/+source/ruby1.9.1/+bug/1578547).

---Files--------------------------------
unit.rb.patch (466 Bytes)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next