Project

General

Profile

Actions

Bug #1248

closed

e.exception(e) returns self

Bug #1248: e.exception(e) returns self

Added by tmat (Tomas Matousek) over 16 years ago. Updated over 14 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.0 (2007-12-25 revision 14709) [i386-mswin32]
Backport:
[ruby-core:22687]

Description

=begin
Exception#exception(arg) instance method should return a new exception of the same class as self with message arg. It does so for any object passed in as an argument except for if e is passed in. I don't see any reason for special casing the method this way.

Repro:
e = Exception.new
p e.exception(e).object_id == e.object_id # => true; it should return false
=end

Actions

Also available in: PDF Atom