ruby-changes:44358
From: nobu <ko1@a...>
Date: Sun, 16 Oct 2016 07:59:53 +0900 (JST)
Subject: [ruby-changes:44358] nobu:r56430 (trunk): test_refinement.rb: using without eval
nobu 2016-10-16 07:59:38 +0900 (Sun, 16 Oct 2016) New Revision: 56430 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56430 Log: test_refinement.rb: using without eval * test/ruby/test_refinement.rb (FooExtClient, FooExtClient2): no needs to eval, using works in a class block now. Modified files: trunk/test/ruby/test_refinement.rb Index: test/ruby/test_refinement.rb =================================================================== --- test/ruby/test_refinement.rb (revision 56429) +++ test/ruby/test_refinement.rb (revision 56430) @@ -70,10 +70,10 @@ class TestRefinement < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/ruby/test_refinement.rb#L70 end end - eval <<-EOF, Sandbox::BINDING + class FooExtClient using TestRefinement::FooExt - class TestRefinement::FooExtClient + begin def self.invoke_x_on(foo) return foo.x end @@ -98,13 +98,13 @@ class TestRefinement < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/ruby/test_refinement.rb#L98 return foo.call_x end end - EOF + end - eval <<-EOF, Sandbox::BINDING + class TestRefinement::FooExtClient2 using TestRefinement::FooExt using TestRefinement::FooExt2 - class TestRefinement::FooExtClient2 + begin def self.invoke_y_on(foo) return foo.y end @@ -113,7 +113,7 @@ class TestRefinement < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/ruby/test_refinement.rb#L113 return foo.a end end - EOF + end def test_override foo = Foo.new -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/