From 76e38253768dd4a73c70c1e78a97788c956316a6 Mon Sep 17 00:00:00 2001 From: knu Date: Sat, 21 Oct 2017 15:57:26 +0000 Subject: [PATCH] Remove redundant use of module_eval git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/set.rb | 14 ++++++-------- 1 file 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