diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-10-15 22:59:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-10-15 22:59:39 +0000 |
commit | 9ec940a4c9ca01d9010f657b60d7336cd3c4161c (patch) | |
tree | 9ae0a2eeba64a659b350a3f780d7a42e129adf6f /test/ruby/test_refinement.rb | |
parent | 9ffaf1405ba30700a69f081126f0f3c96a699466 (diff) |
test_refinement.rb: test_symbol_proc
* test/ruby/test_refinement.rb (test_symbol_proc): move from
test_symbol.rb [Feature #9451]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_refinement.rb')
-rw-r--r-- | test/ruby/test_refinement.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb index a53fe2b522..2ecbf8edf0 100644 --- a/test/ruby/test_refinement.rb +++ b/test/ruby/test_refinement.rb @@ -74,6 +74,10 @@ class TestRefinement < Test::Unit::TestCase using TestRefinement::FooExt begin + def self.map_x_on(foo) + [foo].map(&:x)[0] + end + def self.invoke_x_on(foo) return foo.x end @@ -1737,6 +1741,10 @@ class TestRefinement < Test::Unit::TestCase INPUT end + def test_symbol_proc + assert_equal("FooExt#x", FooExtClient.map_x_on(Foo.new)) + end + private def eval_using(mod, s) |