From: okkez _ Date: 2008-12-17T17:12:44+09:00 Subject: [ruby-core:20611] [Bug #897] Kenel#describe should be private in minitest/spec Bug #897: Kenel#describe should be private in minitest/spec http://redmine.ruby-lang.org/issues/show/897 Author: okkez _ Status: Open, Priority: Normal Assigned to: Ryan Davis, Category: lib I think Kernel#describe should be private. code: # OK describe 'aaa' do do_something end # NG (I think that this code should raise an exception) 99.describe 'bbb' do do_something end patch: Index: lib/minitest/spec.rb =================================================================== --- lib/minitest/spec.rb (revision 20785) +++ lib/minitest/spec.rb (working copy) @@ -54,6 +54,7 @@ end module Kernel + private def describe desc, &block cls = Class.new(MiniTest::Spec) Object.const_set desc.to_s.split(/\W+/).map { |s| s.capitalize }.join, cls ---------------------------------------- http://redmine.ruby-lang.org