summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-21 15:57:26 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-21 15:57:26 +0000
commit76e38253768dd4a73c70c1e78a97788c956316a6 (patch)
tree32da8d8c31c441ae8f8613fb8e3d8359201ab2de
parent92746378ab84c3e935392097354e6e74d4abec82 (diff)
Remove redundant use of module_eval
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/set.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/set.rb b/lib/set.rb
index 292a00adf9..a4ed61f8f5 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