diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-10-15 22:59:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-10-15 22:59:38 +0000 |
commit | 9ffaf1405ba30700a69f081126f0f3c96a699466 (patch) | |
tree | 3a35ea6b05ee7eae9d79f5d5b8e169c7487e13d2 /test | |
parent | 65c9aaa917f4c4326d42294b282119b9ed5b1fb3 (diff) | |
download | ruby-9ffaf1405ba30700a69f081126f0f3c96a699466.tar.gz |
test_refinement.rb: using without eval
* test/ruby/test_refinement.rb (FooExtClient, FooExtClient2): no
needs to eval, using works in a class block now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_refinement.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb index 4f7918e810..a53fe2b522 100644 --- a/test/ruby/test_refinement.rb +++ b/test/ruby/test_refinement.rb @@ -70,10 +70,10 @@ class TestRefinement < Test::Unit::TestCase 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::TestCase 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::TestCase return foo.a end end - EOF + end def test_override foo = Foo.new |