ruby-changes:64537
From: Yusuke <ko1@a...>
Date: Thu, 24 Dec 2020 10:15:35 +0900 (JST)
Subject: [ruby-changes:64537] f755926ddd (master): test/ruby/test_module.rb: not depend on the order of method definitions
https://git.ruby-lang.org/ruby.git/commit/?id=f755926ddd From f755926ddd3b92248f1fcdf977bd8537bff1f1dd Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Thu, 24 Dec 2020 10:14:39 +0900 Subject: test/ruby/test_module.rb: not depend on the order of method definitions diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 1ff9bef..43f0c51 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -1413,7 +1413,7 @@ class TestModule < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_module.rb#L1413 end def test_top_public_private - assert_in_out_err([], <<-INPUT, %w([:foo] [:bar] [:foo,\ :bar] [] [:foo,\ :bar] []), []) + assert_in_out_err([], <<-INPUT, %w([:foo] [:bar] [:bar,\ :foo] [] [:bar,\ :foo] []), []) private def foo; :foo; end public @@ -1422,16 +1422,16 @@ class TestModule < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_module.rb#L1422 p self.methods.grep(/^foo$|^bar$/) private :foo, :bar - p self.private_methods.grep(/^foo$|^bar$/) + p self.private_methods.grep(/^foo$|^bar$/).sort public :foo, :bar - p self.private_methods.grep(/^foo$|^bar$/) + p self.private_methods.grep(/^foo$|^bar$/).sort private [:foo, :bar] - p self.private_methods.grep(/^foo$|^bar$/) + p self.private_methods.grep(/^foo$|^bar$/).sort public [:foo, :bar] - p self.private_methods.grep(/^foo$|^bar$/) + p self.private_methods.grep(/^foo$|^bar$/).sort INPUT end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/