ruby-changes:48189
From: knu <ko1@a...>
Date: Sun, 22 Oct 2017 00:57:30 +0900 (JST)
Subject: [ruby-changes:48189] knu:r60303 (trunk): Remove redundant use of module_eval
knu 2017-10-22 00:57:26 +0900 (Sun, 22 Oct 2017) New Revision: 60303 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60303 Log: Remove redundant use of module_eval Modified files: trunk/lib/set.rb Index: lib/set.rb =================================================================== --- lib/set.rb (revision 60302) +++ lib/set.rb (revision 60303) @@ -643,10 +643,9 @@ class SortedSet < Set https://github.com/ruby/ruby/blob/trunk/lib/set.rb#L643 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 https://github.com/ruby/ruby/blob/trunk/lib/set.rb#L729 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/