summaryrefslogtreecommitdiff
path: root/lib/set.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/set.rb')
-rw-r--r--lib/set.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/set.rb b/lib/set.rb
index 292a00a..a4ed61f 100644
--- a/lib/set.rb
+++ b/lib/set.rb
@@ -643,10 +643,9 @@ class SortedSet < Set
def setup # :nodoc:
@@setup and return
- module_eval {
- # a hack to shut up warning
- alias old_init initialize
- }
+ # a hack to shut up warning
+ alias_method :old_init, :initialize
+
begin
require 'rbtree'
@@ -730,10 +729,9 @@ class SortedSet < Set
end
END
end
- module_eval {
- # a hack to shut up warning
- remove_method :old_init
- }
+
+ # a hack to shut up warning
+ remove_method :old_init
@@setup = true
end