Permalink
Browse files

adding test to reproduce JRUBY-3917

  • Loading branch information...
1 parent e273d93 commit cce71b8e21f963204e492321427565752edb8b7e @plentz committed Apr 30, 2012
Showing with 26 additions and 0 deletions.
  1. +26 −0 module_redefinition.rb
View
26 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.