diff options
Diffstat (limited to 'spec/ruby/core/module/const_missing_spec.rb')
-rw-r--r-- | spec/ruby/core/module/const_missing_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ruby/core/module/const_missing_spec.rb b/spec/ruby/core/module/const_missing_spec.rb index 24f2b49edc..c6143f2b4c 100644 --- a/spec/ruby/core/module/const_missing_spec.rb +++ b/spec/ruby/core/module/const_missing_spec.rb @@ -24,4 +24,13 @@ describe "Module#const_missing" do end end + it "is called regardless of visibility" do + klass = Class.new do + def self.const_missing(name) + "Found:#{name}" + end + private_class_method :const_missing + end + klass::Hello.should == 'Found:Hello' + end end |