Bug #124 [ruby-core:17154]

Module#remove_method broken in 1.8.6-p166

Added by Arthur Schreiber 175 days ago. Updated 145 days ago.

Status :Closed Start :06/09/2008
Priority :Normal Due date :
Assigned to :- % Done :

100%

Category :-
Target version :-

Description

Module#remove Method should raise a NameError when trying to remove non-existant methods.

On Ruby 1.8.6-p111, Ruby 1.8.6-p114, Ruby 1.8.7, Ruby 1.8.7-p7 and Ruby 1.8.7-p17:

irb(main):001:0> class A; remove_method :blabla; end
NameError: method `blabla' not defined in A
	from (irb):1:in `remove_method'
	from (irb):1

But on Ruby 1.8.6-p166:

irb(main):001:0> class A; remove_method :blabla; end
=> A

History

06/09/2008 09:53 PM - Vladimir Sizikov

Looks like r16816:
"merge revision(s) 13586:
  * eval.c (remove_method): should not remove undef place holder. [ruby-dev:31817]"

is the reason for this regression.

06/09/2008 09:53 PM - Anonymous

Issue #124 has been updated by Vladimir Sizikov.


Looks like r16816:
"merge revision(s) 13586:
  * eval.c (remove_method): should not remove undef place holder. [ruby-dev:31817]"

is the reason for this regression.
----------------------------------------
Bug #124: Module#remove_method broken in 1.8.6-p166
http://redmine.ruby-lang.org/issues/show/124

Author: Arthur Schreiber
Status: Open
Priority: Normal
Assigned to: 
Category: 
Target version: 


Module#remove Method should raise a NameError when trying to remove non-existant methods.

On Ruby 1.8.6-p111, Ruby 1.8.6-p114, Ruby 1.8.7, Ruby 1.8.7-p7 and Ruby 1.8.7-p17:

irb(main):001:0> class A; remove_method :blabla; end
NameError: method `blabla' not defined in A
	from (irb):1:in `remove_method'
	from (irb):1

But on Ruby 1.8.6-p166:

irb(main):001:0> class A; remove_method :blabla; end
=> A


----------------------------------------
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://redmine.ruby-lang.org/my/account

07/09/2008 02:19 PM - Nobuyoshi Nakada

  • Status changed from Open to Closed
  • % Done changed from 0 to 100
Merged to 1.8.6 branch in the repository, at r17646.

Also available in: Atom PDF