diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_symbol.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb index 2e9710e4dc..632acb3e3d 100644 --- a/test/ruby/test_symbol.rb +++ b/test/ruby/test_symbol.rb @@ -169,6 +169,9 @@ class TestSymbol < Test::Unit::TestCase def _test_to_proc_arg_with_refinements_call(&block) block.call TestToPRocArgWithRefinements.new end + def _test_to_proc_with_refinements_call(&block) + block + end using Module.new { refine TestToPRocArgWithRefinements do def hoge @@ -180,6 +183,10 @@ class TestSymbol < Test::Unit::TestCase assert_equal(:hoge, _test_to_proc_arg_with_refinements_call(&:hoge)) end + def test_to_proc_lambda_with_refinements + assert_predicate(_test_to_proc_with_refinements_call(&:hoge), :lambda?) + end + def self._test_to_proc_arg_with_refinements_call(&block) block.call TestToPRocArgWithRefinements.new end |