Project

General

Profile

Actions

Feature #7848

open

Restore default state for core ruby objects

Added by shevegen (Robert A. Heiler) almost 12 years ago. Updated 8 months ago.

Status:
Assigned
Target version:
-
[ruby-core:52222]

Description

Hi.

Consider:

class String
def lala
puts 'Running lala() from class String.'
end
end

This is possible.

My question is - is there a reason why we can not restore
to the default ruby state again?

For instance, if I would do:

String.restore

I could undo all modifications to String, save what was used
in String class on startup/initialize.

The reason I would like to have something like this is so
that I could safely undo all "monkey" patches again, if needed,
for a given project.

Updated by ko1 (Koichi Sasada) almost 12 years ago

  • Category set to core
  • Assignee set to matz (Yukihiro Matsumoto)
  • Target version set to 2.6

I don't think this proposal can be accepted.

Actions #2

Updated by naruse (Yui NARUSE) almost 7 years ago

  • Target version deleted (2.6)
Actions #3

Updated by hsbt (Hiroshi SHIBATA) 8 months ago

  • Status changed from Open to Assigned
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0