broken.rb

Daniel Mendler, 09/09/2013 10:13 AM

Download (179 Bytes)

 
1
module Test; end
2

    
3
def test
4
  'Refinements are broken!'.chop!
5
end
6

    
7
eval('using Test; test')
8

    
9
module Test
10
  refine(String) do
11
    def chop!
12
      raise self
13
    end
14
  end
15
end
16

    
17
test