diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_symbol.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb index d8c91c1eea..a135338edb 100644 --- a/test/ruby/test_symbol.rb +++ b/test/ruby/test_symbol.rb @@ -435,4 +435,16 @@ class TestSymbol < Test::Unit::TestCase assert_equal str, str.to_sym.to_s assert_not_predicate(str, :frozen?, bug11721) end + + module WithRefinements + using Module.new {refine(Integer) {alias inc succ}} + def mapinc(a) + a.map(&:inc) + end + end + + def test_proc_with_refinements + obj = Object.new.extend WithRefinements + assert_equal [*1..3], obj.mapinc(0..2) + end end |