Skip to content

Commit

Permalink
adding test to reproduce JRUBY-3917
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Plentz committed Apr 30, 2012
1 parent e273d93 commit cce71b8
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions module_redefinition.rb
@@ -0,0 +1,26 @@
require 'rubygems'
require 'minitest/autorun'

class ModuleRedefinitionTest < MiniTest::Unit::TestCase
class Foo
private
def foo
p :foo
end
end

class Bar < Foo
public :foo
end

class Foo
def foo
p :redefined
end
end

def test_module_redefinition
b = Bar.new
assert_equal b.foo, :redefined
end
end

0 comments on commit cce71b8

Please sign in to comment.