Comment 6 for bug 23586

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Wed, 10 Aug 2005 12:28:08 +0200
From: Paul van Tilburg <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: ruby1.8: Exceptions in threads all get converted to a TypeError

Package: ruby1.8
Version: 1.8.2-9
Severity: normal
Tags: sid

When "abort_on_exception" for Thread is set to true, exceptions get
transformed to a TypeError with the same message everytime regardless what
the original exception was. This makes it very hard to debug programs
using threads. This problems only occurs with Ruby 1.8.3 (or this is the
version ruby1.8 in sid reports):

In sarge:
---
irb(main):001:0> Thread.abort_on_exception = true
=> true
irb(main):002:0> Thread.new { p foo }
(irb):2:in `irb_binding': undefined local variable or method `foo' for main:Object (NameError)
        from (irb):2:in `initialize'
        from (irb):2:in `new'
        [...]
---

In sid:
---
irb(main):001:0> Thread.abort_on_exception = true
=> true
irb(main):002:0> Thread.new { p foo }
TypeError: no implicit conversion from nil to integer
        from (irb):2:in `initialize'
        from (irb):2
irb(main):003:0> Thread.new { 10 / 0 }
TypeError: no implicit conversion from nil to integer
        from (irb):3:in `initialize'
        from (irb):3
---

Greetings,

Paul

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-686
Locale: LANG=C, LC_CTYPE=nl_NL.UTF8@euro (charmap=UTF-8)

Versions of packages ruby1.8 depends on:
ii libc6 2.3.5-3 GNU C Library: Shared libraries an
ii libruby1.8 1.8.2-9 Libraries necessary to run Ruby 1.

ruby1.8 recommends no packages.

-- no debconf information