mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
65c9aaa917
commit
9ffaf1405b
1 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue